-
Notifications
You must be signed in to change notification settings - Fork 28.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task doesn't execute bash commands in background (with &) #211851
Comments
I have a similar issue on Linux as well. I had to installed an extension to make the task execution auto on startup first. I think the issue is for every command shell, I tried to call an alias with the same command and it does not work. |
I think that your problem is not related to tasks but to shell. When you run a task vscode open a new shell, when your script run source the command is runned in the current shell, so when you open a new shell (not a subshell) maybe the env variables set by virtualenvwrapper are not present. |
I updated #205177
I tried to Use Direct Shell Commands: Instead of relying on aliases or shell-specific commands (like workon in virtualenvwrapper). I tried to change the type to process but nothing worked. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
If I run this script from the terminal it works fine
If I run my task the file is empty.
If I remove & the script is executed correctly in both, the terminal and the task
If I remove only the redirection (>>) nothing change about the execution, from terminal it works fine from tasks doesn't.
If I redirect sterr in stout and then background (2>&1) the result is the same
It seems that background command are not correctly executed.
I read similar issue (#199698) exists and was closed without solution but I can say that the problem exists and is not related to the command runned but to tasks
The text was updated successfully, but these errors were encountered: