formulahendry / formulahendry/vscode-code-runner

.zshrc not sourced / zsh not used even if default? Causes rustc to not show up

Abierto
#511 1 comentario 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
2.4k
Forks
351
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

- VS Code Version: 1.36.1
- OS Version: centOS 7
- Code Runner Version: 0.9.12

**Describe the bug**
When trying to run a rust progarm with the default configuration (`rustc $fileName`) I get
```
/bin/sh: rustc: command not found
```

If I run rustc normally from my terminal, I am able to compile my program.

I am using zsh, and I noticed that if I use a custom command for rust in the settings and I explicitly source my .zshrc file:
```
"code-runner.executorMap": {
"rust": "cd $dir && source ~/.zshrc && rustc $fileName && $dir$fileNameWithoutExt"
}
```
then the command runs fine.

If I echo my $SHELL in the code runner command for rust, I get /bin/zsh. But the error I get from running the default command says `/bin/sh: rustc: command not found`. Does this mean that code runner is somehow not using my default terminal (zsh)? Or for some reasons it is not sourcing my .zshrc? If I print my PATH in the code runner command, I noticed that I get the PATH defined by my .bashrc, and not my .zhsrc file.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Empieza reproduciendo el comando Rust predeterminado en CentOS 7 con zsh y, a continuación, compara el shell y PATH con el comando personalizado que ejecuta source ~/.zshrc. Se considera terminado cuando el executor rustc predeterminado puede encontrar rustc sin requerir que los usuarios añadan un comando de executor personalizado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust, typescript, vscode, zsh
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.