-
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
Fix for windows #1812
Fix for windows #1812
Conversation
- In Windows environment, set the extension of the executable script to .ps1. - When specifying "powershell" for shell in a .dig file, the specification ["powershell.exe","-"] was used until digdag ver. 0.9.x. Since ver. 0.10, the "-" is no longer necessary. However, to ensure compatibility, the specification ["powershell.exe","-"] should be read as ["powershell.exe"].
I am wondering whether rewriting the task definiton of |
List<String> temp_shell; | ||
if (params.has("shell")) { | ||
temp_shell = params.getListOrEmpty("shell", String.class); | ||
if (temp_shell.get(0).toLowerCase().contains("powershell") && temp_shell.size() == 2){ |
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.
contains("powershell")
will match to strings like 'powershell-batch.bat`. Is it intentional ?
if (params.has("shell")) { | ||
temp_shell = params.getListOrEmpty("shell", String.class); | ||
if (temp_shell.get(0).toLowerCase().contains("powershell") && temp_shell.size() == 2){ | ||
if (temp_shell.get(1).contains("-")){ |
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.
ditto. It will match like -option
or abc-def.txt
.
@yoyama , thank you for your review. |
sh> operator of v0.10.0 on Windows platform and compatibility
When specifying "powershell" for shell in a .dig file, the "powershell.exe" was
specified as ["powershell.exe","-"] until digdag ver. 0.9.x.
Since ver. 0.10 the "-" is no longer necessary.
However, for compatibility, the specification ["powershell.exe","-"]
should be read as ["powershell.exe"].
[WIP] Fix sh> operator issue on Windows #1654 is also included.