Skip to content

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

Merged
paul-marechal merged 1 commit intomasterfrom
bash
Dec 8, 2020
Merged

fix: remove bash login shell when run from task to align with vscode#8834
paul-marechal merged 1 commit intomasterfrom
bash

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 amiram.wingarten@sap.com

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 <amiram.wingarten@sap.com>
@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
@ndoschek ndoschek deleted the bash branch December 5, 2025 15:38
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