Skip to content

Commit 8fddeaa

Browse files
pquentingithub-actions[bot]
authored andcommitted
Fix cache on 'make validate' (#4005)
Also fix a few typod (cherry picked from commit 3b13edc)
1 parent 02d35bb commit 8fddeaa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

compiler/run-validations.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ try {
3131
closest = fl.closest
3232
minimist = require('minimist')
3333
} catch (err) {
34-
console.log('It looks like you didn\'t install the project dependencies, please run \'make setup\'')
34+
console.log(
35+
"It looks like you didn't install the project dependencies, please run 'make setup'"
36+
)
3537
process.exit(1)
3638
}
3739

@@ -60,7 +62,8 @@ const apis = require('../output/schema/schema.json')
6062
async function run () {
6163
const options = minimist(process.argv.slice(2), {
6264
string: ['api', 'type', 'branch'],
63-
boolean: ['cache']
65+
boolean: ['cache'],
66+
default: { cache: true }
6467
})
6568

6669
spinner.text = 'Checking requirements'
@@ -93,7 +96,7 @@ async function run () {
9396

9497
const isFlightRecorderCloned = await $`[[ -d ${path.join(__dirname, '..', '..', 'clients-flight-recorder')} ]]`.exitCode === 0
9598
if (!isFlightRecorderCloned) {
96-
spinner.text = 'It looks like you didn\'t cloned the flight recorder, doing that for you'
99+
spinner.text = 'It looks like you didn\'t clone the flight recorder, doing that for you'
97100
await $`git clone https://github.com/elastic/clients-flight-recorder.git ${path.join(__dirname, '..', '..', 'clients-flight-recorder')}`
98101
} else if (isStale) {
99102
spinner.text = 'Pulling the latest flight recorder changes'
@@ -105,7 +108,7 @@ async function run () {
105108
const isCompilerInstalled = await $`[[ -d ${path.join(compilerPath, 'node_modules')} ]]`.exitCode === 0
106109
const isTsGeneratorInstalled = await $`[[ -d ${path.join(tsGeneratorPath, 'node_modules')} ]]`.exitCode === 0
107110
if (noCache || !isCompilerInstalled || !isTsGeneratorInstalled) {
108-
spinner.text = 'It looks like you didn\'t installed the project dependencies, doing that for you'
111+
spinner.text = 'It looks like you didn't install the project dependencies, doing that for you'
109112
await $`npm install --prefix ${compilerPath}`
110113
await $`npm install --prefix ${tsGeneratorPath}`
111114
}

0 commit comments

Comments
 (0)