Skip to content

Commit

Permalink
Move file
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 5, 2022
1 parent c9936ee commit 943bbb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { fileURLToPath } from 'url'
import { readPackageUp } from 'read-pkg-up'
import UpdateNotifier from 'update-notifier'

import { handleCliError } from '../error/cli.js'
import { run, show, remove, dev } from '../main.js'

import { handleCliError } from './error.js'
import { parseCliFlags } from './parse.js'
import { defineCli } from './top.js'

Expand Down
4 changes: 3 additions & 1 deletion src/bin/error.js → src/error/cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import process from 'process'

import { normalizeError } from '../error/normalize/main.js'
import { normalizeError } from './normalize/main.js'

// Print CLI errors and exit, depending on the error type
export const handleCliError = function (error, opts) {
Expand Down Expand Up @@ -90,6 +90,7 @@ const MAX_EXIT_CODE = 125

// We do not throw since we are using the top-level error handling logic
const handleOptsError = function (message, value) {
// eslint-disable-next-line no-restricted-globals, no-console
console.error(`handle-cli-error invalid usage: ${message}`)
return value
}
Expand All @@ -101,6 +102,7 @@ const printError = function (error, silent, short) {
}

const errorMessage = short ? error.message : error.stack
// eslint-disable-next-line no-restricted-globals, no-console
console.error(errorMessage)
}

Expand Down

0 comments on commit 943bbb7

Please sign in to comment.