From 19f4e8dd3e39db5ad4f972f23e486d23264cd1b7 Mon Sep 17 00:00:00 2001 From: ddorando <87425418+ddorando@users.noreply.github.com> Date: Wed, 6 Sep 2023 19:10:10 +0300 Subject: [PATCH] enforce absolute path for getGitPath --- dist/index.js | 2 +- src/git-command-manager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index bd860ab..e215ed4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -831,7 +831,7 @@ class GitCommandManager { } getGitPath(path) { return __awaiter(this, void 0, void 0, function* () { - const args = ['rev-parse', '--git-path']; + const args = ['rev-parse', '--path-format=absolute', '--git-path']; if (path) args.push(path); const output = yield this.exec(args); diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 28241dd..d913d76 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -147,7 +147,7 @@ export class GitCommandManager { } async getGitPath(path?: string): Promise { - const args = ['rev-parse', '--git-path'] + const args = ['rev-parse', '--path-format=absolute', '--git-path'] if (path) args.push(path) const output = await this.exec(args) return output.stdout.trim()