formulahendry / formulahendry/vscode-code-runner

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

Aperta
#511 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
2.4k
Fork
351
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

- 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.