Skip to content

Commit ef12d3c

Browse files
committed
feat: do not report error when a package does not export a configure hook
Just warn
1 parent f319a80 commit ef12d3c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

commands/configure.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,9 @@ export default class Configure extends BaseCommand {
179179
* Warn, there are not instructions to run
180180
*/
181181
if (!packageExports.configure) {
182-
this.logger.error(
182+
this.logger.warning(
183183
`Cannot configure module "${this.name}". The module does not export the configure hook`
184184
)
185-
this.exitCode = 1
186185
return
187186
}
188187

tests/commands/configure.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ test.group('Configure command | run', (group) => {
173173
await command.exec()
174174

175175
command.assertLog(
176-
'[ red(error) ] Cannot configure module "./dummy-pkg.js?v=1". The module does not export the configure hook'
176+
'[ yellow(warn) ] Cannot configure module "./dummy-pkg.js?v=1". The module does not export the configure hook'
177177
)
178-
assert.equal(command.exitCode, 1)
178+
assert.equal(command.exitCode, 0)
179179
})
180180

181181
test('run package configure method', async ({ assert, fs }) => {

0 commit comments

Comments
 (0)