jquery/build/tasks/lib/isCleanWorkingDir.js
2024-03-11 13:36:09 -04:00

10 lines
284 B
JavaScript

"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();
};