Skip to content

Commit

Permalink
Fix for passing array for files option when running app
Browse files Browse the repository at this point in the history
Fixes #378
  • Loading branch information
adam-lynch committed Oct 9, 2016
1 parent b52be49 commit 51db187
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ NwBuilder.prototype.runApp = function () {

self.emit('log', 'Launching App');
return new Promise(function(resolve, reject) {
var nwProcess = self._nwProcess = spawn(executable, ['--enable-logging', self.options.files.replace(/\*[\/\*]*/,"")].concat(self.options.argv));
var parentDirectory = (_.isArray(self.options.files) ? self.options.files[0] : self.options.files ).replace(/\*[\/\*]*/,"");
var nwProcess = self._nwProcess = spawn(executable, ['--enable-logging', parentDirectory].concat(self.options.argv));

self.emit('appstart');

Expand Down

0 comments on commit 51db187

Please sign in to comment.