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.
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.
According toC:\windows\system32\tar.exe --help
the option-C
is only for create, it is not a common option.Also @joshmgross informed me bsd tar does not support
--force-local
. AndC:\windows\system32\tar.exe
is bsd tar.Instead of
-C
I think dest should be the working directory (exec option).Thoughts?
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.
ExecOptions.cwd
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.
@ericsciple, while using option
cwd
works, I am not sure about--force-local
. It seems to be required. See: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.
Oh I see. Because of the other file path 🤦
The problem is the hosted machines prepend the gnu tools to the PATH, rather than append to the PATH.
Self hosted runners would more commonly have %windir%\System32\tar.exe (bsd tar) in the PATH.
And bsd tar works correctly. It also doesn't require forward slashes.
I think the correct solution is: on Windows don't which
tar
.Instead do:
`${process.env['windir']}\\System32\\tar.exe`
If tar doesn't exist at that location, fail.
Thoughts?
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.
@ericsciple, thanks for the details. If that is the case, I think that more effort is required than just fixing
if (IS_WINDOWS)
in this repo:tar
command that would hide the inconsistencies in the implementation of the runners from the user. Not usingwhich
has the side effect that the arguments might need to be explicitly different for windows-latest, ubuntu-latest and macos-latest.Then, it will be up to action developers to use the command or to handle it with custom logic.
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.
I dont like the solution i proposed anymore. @thboop good point that it doesnt cover older windows which the runner supports.