Ignore stderr of git version check instead of redirecting it to /dev/null

This commit is contained in:
Jérémie Astori 2018-04-16 15:35:17 +02:00
parent 34f4d0abf4
commit 3cf4e2105e
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8

View file

@ -64,7 +64,10 @@ function getGitCommit() {
try {
_gitCommit = require("child_process")
.execSync("git rev-parse --short HEAD 2> /dev/null") // Returns hash of current commit
.execSync(
"git rev-parse --short HEAD", // Returns hash of current commit
{stdio: ["ignore", "pipe", "ignore"]}
)
.toString()
.trim();
return _gitCommit;