jquery/build/tasks/lib/isCleanWorkingDir.js

10 lines
284 B
JavaScript
Raw Normal View History

"use strict";
const util = require( "node:util" );
const exec = util.promisify( require( "node:child_process" ).exec );
module.exports = async function isCleanWorkingDir() {
const { stdout } = await exec( "git status --untracked-files=no --porcelain" );
return !stdout.trim();
};