mirror of https://github.com/embarklabs/embark.git
13 lines
309 B
JavaScript
13 lines
309 B
JavaScript
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);
|
|
}
|