Skip to content

Commit

Permalink
Make sure copyToDir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
phBalance committed Oct 8, 2019
1 parent b2af82e commit 83079b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions command_line.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

const fs = require("fs");
const path = require("path");
const log = require("loglevel");

Expand Down Expand Up @@ -77,6 +78,9 @@ try {
parsed.map = [];
}

// Make sure the copyToDir exists
console.assert(!parsed.copyToDir || fs.existsSync(parsed.copyToDir), `copyToDir ${parsed.copyToDir} doesn't exist`);

// Start logging
log.setLevel(parsed.loglevel, false);

Expand Down

0 comments on commit 83079b3

Please sign in to comment.