mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge pull request #1366 from jbondc/master
Fix so 'jake diff' works with PowerShell.
This commit is contained in:
17
Jakefile
17
Jakefile
@@ -366,7 +366,7 @@ desc("Builds the test infrastructure using the built compiler");
|
||||
task("tests", ["local", run].concat(libraryTargets));
|
||||
|
||||
function exec(cmd, completeHandler) {
|
||||
var ex = jake.createExec([cmd]);
|
||||
var ex = jake.createExec([cmd], {windowsVerbatimArguments: true});
|
||||
// Add listeners for output and error
|
||||
ex.addListener("stdout", function(output) {
|
||||
process.stdout.write(output);
|
||||
@@ -488,18 +488,25 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory], function(
|
||||
exec(cmd);
|
||||
}, {async: true});
|
||||
|
||||
function getDiffTool() {
|
||||
var program = process.env['DIFF']
|
||||
if (!program) {
|
||||
fail("Add the 'DIFF' environment variable to the path of the program you want to use.")
|
||||
}
|
||||
return program;
|
||||
}
|
||||
|
||||
// Baseline Diff
|
||||
desc("Diffs the compiler baselines using the diff tool specified by the %DIFF% environment variable");
|
||||
desc("Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable");
|
||||
task('diff', function () {
|
||||
var cmd = "%DIFF% " + refBaseline + ' ' + localBaseline;
|
||||
var cmd = '"' + getDiffTool() + '" ' + refBaseline + ' ' + localBaseline;
|
||||
console.log(cmd)
|
||||
exec(cmd);
|
||||
}, {async: true});
|
||||
|
||||
desc("Diffs the RWC baselines using the diff tool specified by the %DIFF% environment variable");
|
||||
desc("Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable");
|
||||
task('diff-rwc', function () {
|
||||
var cmd = "%DIFF% " + refRwcBaseline + ' ' + localRwcBaseline;
|
||||
var cmd = '"' + getDiffTool() + '" ' + refRwcBaseline + ' ' + localRwcBaseline;
|
||||
console.log(cmd)
|
||||
exec(cmd);
|
||||
}, {async: true});
|
||||
|
||||
Reference in New Issue
Block a user