Skip to content
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

windows service config file/dir paths not escaped with quotes in NSSM config #448

Closed
pjjohnstone opened this issue May 31, 2017 · 4 comments

Comments

@pjjohnstone
Copy link

Command block from helpers.rb:

def command(config_file, config_dir)
      if windows?
        %(agent -config-file="""#{config_file}""" -config-dir="""#{config_dir}""")
      else
        "/usr/local/bin/consul agent -config-file=#{config_file} -config-dir=#{config_dir}"
      end
    end

But the resulting reg entry in the consul service hive is:
agent -config-file=C:\Program Files\consul\consul.json -config-dir=C:\Program Files\consul\conf.d

Which causes the following startup/restart error:
Error reading 'C:\Program': open C:\Program: The system cannot find the file specified.

Using latest master branch from repo NOT the supermarket cookbook.

@legal90
Copy link
Contributor

legal90 commented May 31, 2017

Pinging @Ginja. Could you please take a look at this issue? How does it work for you?

@pjjohnstone
Copy link
Author

I can no longer reproduce this, no idea what was going on.

@knightorc
Copy link

@pjjohnstone I hit the same issue. It depended on which version of nssm.exe was on your system. I've tweaked our local copy of this cookbook so we can support nssm cookbook > 4.0

@Ginja I was going to issue a PR to summit my tweaks after I'd tested all use cases.

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants