Skip to content

Commit

Permalink
Fix git checking out on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
domchen committed Nov 16, 2023
1 parent 4f14bd0 commit 16398e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tasks/RepoTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

const path = require('path');
const fs = require('fs');
const os = require('os')
const Utils = require("../Utils");

function AddLoginInfo(url, user, password) {
Expand Down Expand Up @@ -78,11 +79,11 @@ RepoTask.prototype.run = function (callback) {
}
if (item.shallow) {
Utils.exec("git fetch --depth 1 origin " + item.commit, item.dir);
Utils.exec("GIT_LFS_SKIP_SMUDGE=1 git reset --hard FETCH_HEAD", item.dir);
} else {
Utils.exec("git fetch origin " + item.commit, item.dir);
Utils.exec("GIT_LFS_SKIP_SMUDGE=1 git reset --hard FETCH_HEAD", item.dir);
}
process.env["GIT_LFS_SKIP_SMUDGE"]="1";
Utils.exec("git reset --hard FETCH_HEAD", item.dir);
callback && callback();
};

Expand Down

0 comments on commit 16398e5

Please sign in to comment.