mirror of https://github.com/embarklabs/embark.git
15 lines
339 B
JavaScript
15 lines
339 B
JavaScript
/* global process require */
|
|
|
|
const {execSync} = require('child_process');
|
|
|
|
try {
|
|
const output = execSync('git status');
|
|
const exitCode = (
|
|
execSync('git status --porcelain').toString().trim() === '' ? 0 : 1
|
|
);
|
|
if (exitCode) console.error(output.toString().trim());
|
|
process.exit(exitCode);
|
|
} catch (e) {
|
|
process.exit(1);
|
|
}
|