Skip to content

Commit a91cb50

Browse files
1 parent a61bc8c commit a91cb50

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/spectral/ipa/metrics/scripts/runMetricCollection.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ if (!fs.existsSync(config.defaultOutputsDir)) {
1313
console.log(`Output directory created successfully`);
1414
}
1515

16+
if (!fs.existsSync(config.defaultRulesetFilePath)) {
17+
console.error('Could not find ruleset file path', config.defaultRulesetFilePath);
18+
process.exit(1);
19+
}
20+
21+
if (!oasFilePath && !fs.existsSync(config.defaultOasFilePath)) {
22+
console.error('Could not find default OAS file path', config.defaultOasFilePath);
23+
process.exit(1);
24+
}
25+
1626
const result = spawnSync('spectral', [
1727
'lint',
1828
oasFilePath ? oasFilePath : config.defaultOasFilePath,

0 commit comments

Comments
 (0)