Skip to content

Commit 29c68f3

Browse files
author
Vlad Barosan
authored
Fail Breaking Changes CI on exception (Azure#2500)
1 parent 64683a5 commit 29c68f3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/breaking-change.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var utils = require('../test/util/utils'),
1010
execSync = require('child_process').execSync,
1111
oad = require('oad');
1212

13-
// This map is used to store the mapping between files resolved and stored location
13+
// This map is used to store the mapping between files resolved and stored location
1414
var resolvedMapForNewSpecs = {};
1515
let outputFolder = path.join(os.tmpdir(), "resolved");
1616
// Used to enable running script outside TravisCI for debugging
@@ -46,6 +46,7 @@ function runOad(oldSpec, newSpec) {
4646
return Promise.resolve();
4747
}).catch(err => {
4848
console.log(err);
49+
process.exitCode = 1;
4950
});
5051
}
5152

@@ -71,7 +72,7 @@ function processViaAutoRest(swaggerPath) {
7172
let result = execSync(`${autoRestCmd}`, { encoding: 'utf8', maxBuffer: 1024 * 1024 * 64 });
7273
resolvedMapForNewSpecs[outputFileNameWithExt] = path.join(outputFolder, outputFileNameWithExt);
7374
} catch (err) {
74-
// Do not update map in case of errors
75+
// Do not update map in case of errors.
7576
}
7677

7778
return Promise.resolve();

0 commit comments

Comments
 (0)