-
Notifications
You must be signed in to change notification settings - Fork 781
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
failed parsing command: only single commands supported on windows #1513
Comments
Hey @carldai0106, thanks for taking the time to file an issue. In 0.27.0 we stopped using a shell parsing library that was the constant source of bugs. Unfortunately to eliminate it we had to change some behaviors, primarily the parsing of the command to run. To handle shell parsing on *nix systems we run the command using a shell directly ( TLDR; to get your command working put it in a windows batch file or PowerShell script and run that. Alternatively if you happen to know of a Windows equivalent of a *nix shell ( |
I've added supporting a command list feature to the roadmap for v0.28.0. That will allow you to explicitly support any command needed by providing a pre-parsed command list to the system call. This should address any issues remaining issues with command calls on any platform. |
Can you please elaborate on this for Windows? You suggested to run a Powershell script but if you're passing the value of the "command" key just to a shell, for example: then that won't execute the Powershell script. Thanks. |
Hey @rba1-source, thanks for the question. Do you mean you have to pass a command parameter when calling a powershell script? That it is not possible to create a script that is directly executable? I was under the impression that was possible. If that is not possible maybe the old .bat file type script would work? If that isn't... the next best thing I can offer is to say that for 0.28.0 I'll be adding support for command-lists which will allow you to provide a command with arguments in a pre-parsed form. I'm starting work on the remaining open tickets pretty much today and will be releasing it once those are complete. Thanks. |
I got this working quite clumsily by creating a .bat file that has my 1 line of: This works because the "command" has no spaces in, since you can call a .bat file from cmd directly by using the filename. |
Glad you got it working! For updates on the command list handling mentioned above, see ticket #1518. |
Please note that the Consul Template issue tracker is reserved
for bug reports and enhancements. For general usage questions,
please use the Consul Community Portal or the Consul mailing list:
Please try to simplify the issue as much as possible and include all the
details to replicate it. The shorter and simpler the bug is to reproduce the
quicker it can be addressed. Thanks.
Consul Template version
consul-template version is 0.27.0
Configuration
Command
Debug output
Actual behavior
I am running consul-template to windows 10 using powershell.
When a service was off-line. then upstreams.conf will update and the same time to reload nginx config file.
but it can not run nginx -s reload on windows system.
The text was updated successfully, but these errors were encountered: