Skip to content

Commit

Permalink
fix: throw error when input doesn't match any files
Browse files Browse the repository at this point in the history
closes #90
  • Loading branch information
egoist committed Aug 16, 2020
1 parent 90fbc54 commit e551226
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ function stopServices() {
export async function build(options: Options) {
options = { ...options }

options.entryPoints = await glob(options.entryPoints)
const input = options.entryPoints
options.entryPoints = await glob(input)

if (options.entryPoints.length === 0) {
throw new PrettyError(`Cannot find ${input}`)
}

let watcher: FSWatcher | undefined

Expand Down

0 comments on commit e551226

Please sign in to comment.