embark/scripts/check-working-tree.js

13 lines
256 B
JavaScript

/* global process require */
const {execSync} = require('child_process');
try {
execSync('git status', {stdio: 'inherit'});
process.exit(
execSync('git status --porcelain').toString().trim() === '' ? 0 : 1
);
} catch (e) {
process.exit(1);
}