-
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
Source bash tasks instead of executing them #11760
Conversation
Tasks/BashV3/bash.ts
Outdated
contents = `. '${targetFilePath.replace("'", "'\\''")}' ${input_arguments}`.trim(); | ||
} else { | ||
// Check if executable bit is set | ||
let stats: fs.Stats = tl.stats(input_filePath); |
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.
This is where the mistake was last time - in the last iteration of this PR, I was doing a stats call on targetFilePath
instead of input_filePath
. This is a problem because targetFilePath
gets some modifications on just windows so that it will work with bash, that cause stats to fail.
@stephenmichaelf are you okay with this change? |
@stephenmichaelf could you take a look? |
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.
Approving with comments.
AZP_BASHV3_OLD_SOURCE_BEHAVIOR
. If it'strue
, use the old (current) behavior.Fixes #7934
We did this in #9534 and then had to revert in #11571 because of an error, you can see that I'm not making the same mistake here (I've called out where it was) and I've added testing