UNPKG
is-git-status-clean
Version:
latest (1.0.0)
1.0.0
Check if the git working directory is clean
marcofugaro/is-git-status-clean
is-git-status-clean
/
index.js
8 lines
(5 loc)
•
165 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
const
cp =
require
(
'child_process'
)
module
.
exports
=
() =>
{
const
gitStatus = cp.
execSync
(
'git status --porcelain'
).
toString
().
trim
()
return
gitStatus ===
''
}