Open
Description
Describe the bug
I attempted a minimalist example to run the hello program provided by nix from a task and the task is not found after loading / hitting the environment. I'm probably doing something wrong here, but if I load the nix environment before opening vscode from the same terminal things work. Thanks in advance.
To Reproduce
Steps to reproduce the behavior:
# file: default.nix
{ pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
nativeBuildInputs = [ pkgs.hello ];
}
- Start vs code
- Open the project folder
- Select the environment
- Reload the environment
- Click on Terminal menu
- Click on Run Task ... option
- Select hello
- Select continue without scanning task output
The output in the terminal shows that it can't find hello
> Executing task: hello <
zsh:1: command not found: hello
The terminal process "/bin/zsh '-c', 'hello'" failed to launch (exit code: 127).
Terminal will be reused by tasks, press any key to close it.
Expected behavior
The following is the expected output, but I can only get it if vscode is started from a terminal with the nix environment loaded already. Which is precisely what I am looking to not do with this extension.
> Executing task: hello <
Hello, world!
Terminal will be reused by tasks, press any key to close it.
Environment:
- OS: macOS 10.15.7 Catalina
- Version: 1.54.3 (Universal)
- Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8
- Electron: 11.3.0
- Chrome: 87.0.4280.141
- Node.js: 12.18.3
- V8: 8.7.220.31-electron.0
- OS: Darwin x64 19.6.0