-
Notifications
You must be signed in to change notification settings - Fork 224
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
Always end tool install with where command #2668
Conversation
Signed-off-by: Alan Jowett <[email protected]>
@@ -123,6 +123,7 @@ jobs: | |||
run: | | |||
choco install -y llvm --version 11.0.1 --allow-downgrade | |||
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |||
where clang.exe |
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.
nit: does this also help fail the CICD step if the installation of the tool fails?
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.
Yes, the exit code of the last command determines if the task succeeds or fails. The issue is that the choco install fails, but the next line (the "echo") succeeds, so the task wasn't being failed. By adding an explicit check for the binary, this will fail if the exe isn't present.
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.
Please add that fact to the PR description in github. Thanks!
Codecov Report
@@ Coverage Diff @@
## main #2668 +/- ##
==========================================
- Coverage 81.19% 81.17% -0.03%
==========================================
Files 147 147
Lines 27784 27784
==========================================
- Hits 22559 22553 -6
- Misses 5225 5231 +6 |
Description
Tool install commands should validate that the tool is installed and is present in the path via the where command.
Testing
CI/CD
Documentation
No.