Skip to content

Commit

Permalink
trying regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaliang committed Jan 26, 2018
1 parent 43a5d2c commit ccc2159
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/deploy/lifecycleHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ var logger = require('../logger');

function runCommand(command, childOptions) {
return new Promise(function(resolve, reject) {
// TODO: replace with regex (maybe) if this option wins /(\$\S+\s) ^([^\s]*)\s
if (process.env === 'win32') {
var n = command.search('$');
command.substring(n).replace(/^([^\s]*)\s/i, '%');
command.replace('$', '%');
}

logger.info('Running command: ' + command);
if (command === '') {
resolve();
Expand Down

0 comments on commit ccc2159

Please sign in to comment.