Open AshishShanker opened 6 years ago
I noticed that even if I don't specify the stopparentfirst parameter when initializing the Service object, I always get the stopparentfirst argument and a value of undefined, instead of the default of false-y.
stopparentfirst
Service
undefined
false-y
For example, the following code:
const svc = new Service( { name: 'SomeName" description: 'SomeDescription', script:'somefile.js', } ); svc.install();
Will always have the following in the generated somefile.xml
somefile.xml
<argument>--stopparentfirst</argument> <argument>undefined</argument>
Looking at code we should probably use the approach we use for --abortonerror:
--abortonerror
_xml: { enumerable: false, get: function(){ var wrapperArgs = [ '--file', this.script, '--log', this.name + ' ' + 'wrapper', '--grow', this.grow, '--wait', this.wait, '--maxrestarts', this.maxRestarts, '--abortonerror', (this.abortOnError==true?'y':'n'), '--stopparentfirst', (this.stopparentfirst==true?'y':'n') // changed line ];
I noticed that even if I don't specify the
stopparentfirst
parameter when initializing theService
object, I always get thestopparentfirst
argument and a value ofundefined
, instead of the default offalse-y
.For example, the following code:
Will always have the following in the generated
somefile.xml
Looking at code we should probably use the approach we use for
--abortonerror
: