fix(ci): fix file paths in CI-generated *.sha256
files on *nix
#3730
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3693.
See #3693 (comment) for more context.
The
sha[256]sum
command on *nix relies on CWD if you use a relative path as the input arg. All file paths in its output are then relative to it.The PowerShell script doesn't need to be fixed since there's no path in the sha256 file at all.
Concerns
How do I test this change? It does look quite correct though...I've tested locally. Although this is expected to print outf21c44b01678c645d8fbba1e55e4180a01ac5af2d38bcbd14aa665e0d96ed69a *./rustup-init
shasum --check rustup-init.sha256
andsha256sum --check rustup-init.sha256
do pass. I hope this result remains satisfying.Footnotes
According to https://superuser.com/a/1566139,
indicating "text input mode", or an
f21c44b01678c645d8fbba1e55e4180a01ac5af2d38bcbd14aa665e0d96ed69a ./rustup-init
is NOT a legal output. The file path after the separating space must start with either a*
indicating "binary input mode". Given this, it's quite reasonable to see an*
in a sha256 file for a compiled executable. ↩