From cf22d43f5c7a09814cd082100ce2a611fc3b380e Mon Sep 17 00:00:00 2001
From: ezsh <ezsh.junk@gmail.com>
Date: Thu, 22 Oct 2020 03:20:20 +0200
Subject: [PATCH] Gulp: do not try to unlink non-existent file

---
 gulpfile.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gulpfile.js b/gulpfile.js
index e86b7145097..724b0d54e98 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -119,7 +119,11 @@ function injectGitCommit(cb) {
 }
 
 function cleanupGit(cb) {
-	fs.unlink(cfg.gitVersionFile, cb);
+	if (fs.existsSync(cfg.gitVersionFile)) {
+		fs.unlink(cfg.gitVersionFile, cb);
+	} else {
+		cb();
+	}
 }
 
 function compileStory() {
-- 
GitLab