Skip to content

Commit

Permalink
Run as part of constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Apr 20, 2022
1 parent 6365379 commit a6eda61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ class CML {
);
this.token = token || inferToken();
this.driver = driver || inferDriver({ repo: this.repo });

execSync('git config --global --add safe.directory "$PWD"');
execSync("git config --global --add safe.directory '*'");
}

async revParse({ ref = 'HEAD' } = {}) {
Expand Down Expand Up @@ -335,9 +338,6 @@ class CML {
userEmail = GIT_USER_EMAIL,
userName = GIT_USER_NAME
} = opts;
await exec('git config --global --add safe.directory "$PWD"');
await exec("git config --global --add safe.directory '*'");

const driver = getDriver(this);
await exec(await driver.updateGitConfig({ userName, userEmail }));
if (unshallow) {
Expand Down

0 comments on commit a6eda61

Please sign in to comment.