Skip to content

Commit 38db6a1

Browse files
committed
Fail fast if snapshots directory doesn't exist
1 parent b2f3cae commit 38db6a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cli/run.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ module.exports = function (argv) {
7474
var app
7575
var server
7676

77+
if (!fs.existsSync(argv.snapshots)) {
78+
console.log('Error: snapshots directory ' + argv.snapshots + ' doesn\'t exist')
79+
process.exit(1)
80+
}
81+
7782
console.log()
7883
console.log(chalk.cyan(' \\{^_^}/ hi!'))
7984

0 commit comments

Comments
 (0)