Skip to content

Commit

Permalink
fix(cli): check input/outputs exist and are strings
Browse files Browse the repository at this point in the history
  • Loading branch information
wopian committed Feb 14, 2023
1 parent 07f690e commit fe9db3a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,14 @@ program.parse()

const { input, output } = program.opts()

if (!input || typeof input !== 'string') {
console.log('Please provide a valid input path')
process.exit(1)
}

if (!output || typeof output !== 'string') {
console.log('Please provide a valid output path')
process.exit(1)
}

combine(input, output)

0 comments on commit fe9db3a

Please sign in to comment.