Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --abortOnUnknownConfig to OTP graph builds #37

Merged
merged 7 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions __tests__/__snapshots__/otp-runner.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ Array [
"./temp-test-files/ok.jar",
"--build",
"--save",
"--abortOnUnknownConfig",
"./temp-test-files/",
]
`;
Expand Down
1 change: 1 addition & 0 deletions __tests__/test-utils/mocks/cli-processes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs-extra')

const { TEMP_TEST_FOLDER } = require('../constants')

Check warning on line 5 in __tests__/test-utils/mocks/cli-processes.js

View workflow job for this annotation

GitHub Actions / test-build-release

There should be at least one empty line between import groups
const { addCustomExecaMock, addCustomSpawnMock } = require('./modules')

/**
Expand Down Expand Up @@ -94,6 +94,7 @@
javaArgs.push(`./${TEMP_TEST_FOLDER}/ok-otp-2.jar`)
javaArgs.push('--build')
javaArgs.push('--save')
javaArgs.push('--abortOnUnknownConfig')
javaArgs.push(`./${baseFolder}`)
} else {
javaArgs.push(`./${TEMP_TEST_FOLDER}/ok.jar`)
Expand Down
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
waitOneSecond
} = require('./util')

const manifestJsonSchema = require('../manifest-json-schema.json')

Check warning on line 22 in lib/index.js

View workflow job for this annotation

GitHub Actions / test-build-release

`../manifest-json-schema.json` import should occur before import of `./util`

module.exports = class OtpRunner {
constructor (manifest) {
Expand Down Expand Up @@ -174,7 +174,7 @@
* also populate default values in the manifest if they are not provided in
* the input manifest.
*/
async validateManifest () {

Check warning on line 177 in lib/index.js

View workflow job for this annotation

GitHub Actions / test-build-release

Async method 'validateManifest' has a complexity of 15
// first validate using the manifest's JSON schema. This will also add in all
// of the default values to the manifest variable
const ajv = new JSONSchemaValidator({ allErrors: true, useDefaults: true })
Expand Down Expand Up @@ -267,7 +267,7 @@
${errors.join('\n')}`)
}

// if this point is reached, the manfiest.json file is valid!
// if this point is reached, the manifest.json file is valid!
this.log.info('manifest is valid!')
this.log.info(JSON.stringify(this.manifest, null, 2))
}
Expand Down Expand Up @@ -364,6 +364,7 @@
args.push('--build')
if (this.isUsingOtp2x()) {
args.push('--save')
args.push('--abortOnUnknownConfig')
}
args.push(this.getTargetFolder())
return args
Expand Down
Loading