Skip to content
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

fix: remove bash login shell when run from task to align with vscode #8834

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

amiramw
Copy link
Member

@amiramw amiramw commented Dec 7, 2020

Following discussion: #8818

bash login shell (-l) causing different behavior compared to non login.
for example - it rebuilds the PATH environment and ignore what was defined in theia docker.

this change aligns with vscode that doesn't run with login shell.

Signed-off-by: Amiram Wingarten [email protected]

How to test

  1. Start theia from docker with debian and set PATH to add to some new folder
  2. Put some executable in the new folder
  3. Create simple shell task that runs the executable:
{
	"version": "2.0.0",
	"tasks": [
		{
			"label": "MyTask",
			"type": "shell",
			"command": "<my executable>"
		}
	]
}

After this fix the run is successful. Before this fix it fail with error code 127 as the executable is not found.

Review checklist

Reminder for reviewers

@amiramw amiramw requested a review from paul-marechal December 7, 2020 21:51
@paul-marechal paul-marechal added the tasks issues related to the task system label Dec 7, 2020
@paul-marechal
Copy link
Member

Please just add an entry to the CHANGELOG's breaking changes to mention that shell tasks will no longer be ran into login shells.

bash login shell (-l) causing different behavior compared to non login.
for example - it rebuilds the PATH environment and ignore what was defined in theia docker.

this change aligns with vscode that doesn't run with login shell.

Signed-off-by: Amiram Wingarten <[email protected]>
@amiramw
Copy link
Member Author

amiramw commented Dec 8, 2020

Please just add an entry to the CHANGELOG's breaking changes to mention that shell tasks will no longer be ran into login shells.

Done

@paul-marechal paul-marechal merged commit 4641a29 into master Dec 8, 2020
@github-actions github-actions bot added this to the 1.9.0 milestone Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants