formulahendry / formulahendry/vscode-code-runner

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

Ouverte
#511 1 commentaire 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
2.4k
Forks
352
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par reproduire la commande Rust par défaut sur CentOS 7 avec zsh, puis comparez le shell et PATH avec la commande personnalisée qui exécute source ~/.zshrc. C’est terminé lorsque l’executor rustc par défaut peut trouver rustc sans obliger les utilisateurs à ajouter une commande d’executor personnalisée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
rust, typescript, vscode, zsh
Domaine
tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.