Skip to content
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 site/netlify/functions/error-reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const USER_INPUT_ERROR_MESSAGE_PATTERNS: string[] = [
'could not retrieve project',
"You don't appear to be in a folder that is linked to a project",
'EADDRINUSE: address already in use',
'for a list of available commands',
]

const isUserInputError = (message: unknown): boolean =>
Expand Down
6 changes: 4 additions & 2 deletions src/commands/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ const mainCommand = async function (options, command) {
log()
command.outputHelp({ error: true })
log()
return logAndThrowError(`Run ${NETLIFY_CYAN(`${command.name()} help`)} for a list of available commands.`)
logError(`Run ${NETLIFY_CYAN(`${command.name()} help`)} for a list of available commands.`)
exit(1)
}

const applySuggestion = await new Promise((resolve) => {
Expand All @@ -235,7 +236,8 @@ const mainCommand = async function (options, command) {
log()

if (!applySuggestion) {
return logAndThrowError(`Run ${NETLIFY_CYAN(`${command.name()} help`)} for a list of available commands.`)
logError(`Run ${NETLIFY_CYAN(`${command.name()} help`)} for a list of available commands.`)
exit(1)
}

await execa(process.argv[0], [process.argv[1], suggestion], { stdio: 'inherit' })
Expand Down
Loading