coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.79k stars 358 forks source link

configurable service working directory #198

Closed webarchymeta closed 6 years ago

webarchymeta commented 6 years ago

allow specifying service working directory using config option "cwd"

jdziat commented 6 years ago

This is already possible though via the workingDirectory option. Unless I'm missing something.

webarchymeta commented 6 years ago

You can't set workingDirectory in the config parameter of the constructor of service at present, this PR tries the make it possible. I used a short handed name cwd for it in the config object since I also used the same name in the linux version. Perhaps it would be more consistent to use the name workingDirectory for it in the config object for consistency ...

jdziat commented 6 years ago

I believe it’s called workingdirectory. Look at lib/daemon.js. I could be missing something though.

webarchymeta commented 6 years ago

You are right, but this one doesn't seem to be consistent with naming of other properties

jdziat commented 6 years ago

You’re not wrong but it may have more to do with keeping compatibility with the other node-{os} packages. I’ll have to look into the other packages.

jdziat commented 6 years ago

I’m going to close this as it’s already been enabled. However we do need to review the other codebases and make sure we’re being consistent across all the packages.

JoseIgnacio92 commented 5 years ago

https://github.com/coreybutler/node-windows/issues/225