Closed tdpsk closed 8 years ago
Just for clarity - can you show the command line equivalent?
Sure, here's my output:
And here's the relevant part of my code:
/*
Add jake listener for global errors
*/
jake.addListener('error', function (e) {
jake.logger.error('! An error occured: ' + e.message);
process.exit(1);
});
/*
Tasks for interacting with the target configuration
*/
namespace('target', function () {
desc('Switch to a different target');
task('set', { async: true }, function (target) {
if (!target) {
target = process.env.target;
}
var deployment = verifyTarget(target);
var command = 'parse default "${deployment}"';
jake.logger.log('Running ${command}');
jake.exec(command, { printStdout: true, breakOnError: true }, function () {
// Save target for later use
setTarget(target);
complete();
});
});
});
Ok, solved it. jake.exec has an additional parameter "windowsVerbatimArguments" which I had to set to true. Maybe this could be added to the official docs?
Hi,
when using jake.exec on Windows, it seems to modify the command in an incompatible way before running it. Let me make an example:
The command I am trying to run is: parse default "Deployment". If run manually from the command line, it works fine. However I have the following code in my Jakefile:
Which outputs the command as you would expect, but then raises an error from parse because to argument seems to be translated into ["deployment"]. Here's the output for reference:
Any clues where this comes from?