Skip to content

Commit 9896460

Browse files
authored
repo sync
2 parents 49fa748 + 58aae97 commit 9896460

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

script/rest/update-files.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function main () {
3535
process.exit(1)
3636
}
3737

38-
getDereferencedFiles()
38+
await getDereferencedFiles()
3939
}
4040

4141
await decorate()
@@ -58,7 +58,13 @@ async function getDereferencedFiles () {
5858
mkdirp(tempDocsDir)
5959

6060
console.log(`\n🏃‍♀️🏃🏃‍♀️Running \`bin/openapi bundle\` in branch '${githubBranch}' of your github/github checkout to generate the dereferenced OpenAPI schema files.\n`)
61-
execSync(`${path.join(githubRepoDir, 'bin/openapi')} bundle ${tempDocsDir}`, { stdio: 'inherit' })
61+
try {
62+
execSync(`${path.join(githubRepoDir, 'bin/openapi')} bundle ${tempDocsDir}`, { stdio: 'inherit' })
63+
} catch (error) {
64+
console.error(error)
65+
console.log('🛑 Whoops! It looks like the `bin/openapi bundle` command failed to run in your `github/github` repository checkout. To troubleshoot, ensure that your OpenAPI schema YAML is formatted correctly. A CI test runs on your `github/github` PR that flags malformed YAML. You can check the PR diff view for comments left by the openapi CI test to find and fix any formatting errors.')
66+
process.exit(1)
67+
}
6268

6369
execSync(`find ${tempDocsDir} -type f -name "*deref.json" -exec mv '{}' ${dereferencedPath} ';'`)
6470

0 commit comments

Comments
 (0)