Skip to content

Commit 22b8d1b

Browse files
author
Ryan A. Johnson
committed
fix(deploy): prevent execution without configuration
1 parent 9292b11 commit 22b8d1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/deploy.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77
const Build = require('./build');
88
const CONFIG = require('../_config');
99
const Clean = require('./clean');
10+
const _ = require('lodash');
1011
const fs = require('fs');
1112
const pkgcloud = require('pkgcloud');
1213

14+
// Do not continue without configuration
15+
if (_.isEmpty(CONFIG.cdn.storage)) {
16+
throw new Error('Storage configuration is not defined');
17+
}
18+
1319
const storageClient = pkgcloud.storage.createClient(CONFIG.cdn.storage);
1420

1521
function _upload (client, src, dest) {

0 commit comments

Comments
 (0)