Skip to content

Commit

Permalink
add env checker in collect task
Browse files Browse the repository at this point in the history
  • Loading branch information
im6 committed Feb 29, 2020
1 parent 3cdaa1a commit 11ab8ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/collect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import collectGit from './task/git';
import collectSite from './task/site';
import { viewModelPath } from '../config';

if (!process.env.SQL_HOST) {
console.error('DB connection info missing.'); // eslint-disable-line no-console
process.exit();
}

const gitOutputPath = path.join(process.cwd(), viewModelPath.git);
const siteOutputPath = path.join(process.cwd(), viewModelPath.site);

Expand Down

0 comments on commit 11ab8ba

Please sign in to comment.