Skip to content

Commit 82a4f5c

Browse files
committed
Fix the 'Hook already exists: pre-push' warnning.
1 parent f1a06bd commit 82a4f5c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "depsync",
3-
"version": "1.3.14",
3+
"version": "1.3.15",
44
"author": "Dom Chen",
55
"homepage": "https://github.com/domchen/depsync",
66
"description": "Automatically synchronize the dependencies of a project by the DEPS configuration file.",

src/tasks/SubRepoTask.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ SubRepoTask.prototype.run = function (callback) {
4747
}
4848
let lfsConfig = path.resolve(repoPath, ".gitattributes");
4949
if (fs.existsSync(lfsConfig)) {
50-
if (!LFSInited) {
50+
let prePushFile = path.resolve(repoPath, ".git", "hooks", "pre-push");
51+
if (!LFSInited && !fs.existsSync(prePushFile)) {
5152
Utils.exec("git lfs install", repoPath, true);
5253
LFSInited = true;
5354
}

0 commit comments

Comments
 (0)