-
Notifications
You must be signed in to change notification settings - Fork 167
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
win_command
no longer works for executables in non-standard paths
#403
Comments
Looks like you are correct and the problem is |
#404 should fix this problem for you. |
@jborean93 Great, thanks. However I don't think that PR fixes this issue, I believe it will still be broken for the raw arguments and |
It would be great if you could test it out but it should work. It did locally and I added a test for The code for |
@jborean93 Yes, you are correct. I tested all three argument forms of |
Thanks for confirming, hoping to push out a new release in the coming days. |
Great, thanks so much for the quick response! |
SUMMARY
The changes made in 83cd290 (released in version 1.11.0) have broken the
win_command
module so that it doesn't work with executables in non-standard paths, even if these paths are part of the global WindowsPATH
.ISSUE TYPE
COMPONENT NAME
win_command
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Pop!_OS 22.04 LTS
STEPS TO REPRODUCE
EXPECTED RESULTS
To run the command successfully.
ACTUAL RESULTS
The command fails with an error:
As a workaround, this can be fixed with:
However, this is impractical to do with large playbooks with many instances of
win_command
that invoke various commands. Also, the git installer adds this path to the global WindowsPATH
, which is presumably how suchwin_command
tasks worked on versions previous to 1.11.0.In 83cd290,
win_command
also was changed to supportcmd
andargv
options. Unfortunately, they also do not work. When using thecmd
syntax, the error is the same as above. When usingargv
, there is a different error:...which results in:
This might be caused by a separate bug in
Resolve-ExecutablePath
, which returns all paths concatenated if an executable was found in more than one location. This similar to the behavior ofwhere
, but this module should act more likewhich
and just return the first result only.FYI @jborean93
The text was updated successfully, but these errors were encountered: