-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Execute bash script instead of sourcing #9534
Conversation
Tasks/BashV3/bash.ts
Outdated
// Check if executable bit is set | ||
let stats: fs.Stats = fs.statSync(targetFilePath); | ||
if ((stats.mode & 1) > 0) { | ||
contents = `sh '${targetFilePath.replace("'", "'\\''")}' ${input_arguments}`.trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the purpose to run the script in a sub-shell? Should we use 'bash' instead of 'sh' since 'sh' is not guaranteed to the 'bash' on all systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a good catch, updated appropriately
LGTM |
This reverts commit 676cd20.
AZP_BASHV3_OLD_SOURCE_BEHAVIOR
. If it'strue
, use the old (current) behavior.Fixes #7934