diff options
Diffstat (limited to 'build/tasks/lib/isCleanWorkingDir.js')
-rw-r--r-- | build/tasks/lib/isCleanWorkingDir.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build/tasks/lib/isCleanWorkingDir.js b/build/tasks/lib/isCleanWorkingDir.js new file mode 100644 index 000000000..16c87fd9d --- /dev/null +++ b/build/tasks/lib/isCleanWorkingDir.js @@ -0,0 +1,9 @@ +"use strict"; + +const util = require( "util" ); +const exec = util.promisify( require( "child_process" ).exec ); + +module.exports = async function isCleanWorkingDir() { + const { stdout } = await exec( "git status --untracked-files=no --porcelain" ); + return !stdout.trim(); +}; |