Skip to content

Commit

Permalink
git status-related fixes (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
  • Loading branch information
mark-dr and jakebailey authored Jun 5, 2024
1 parent 50e122e commit 93e8fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface Options {
// Note: Only works if the git repository folder matches tsconfig folder
const getGitStatus = (dir: string) => new Promise<string>((resolve) => {
const dirPath = path.dirname(dir);
return exec(`git --git-dir="${dirPath + "\\.git"}" --work-tree="${dirPath}" status --porcelain`, (err, stdout) => {
return exec(`git --git-dir="${path.join(dirPath, ".git")}" --work-tree="${dirPath}" status --porcelain`, (err, stdout) => {
if (err) {
throw new Error(err.message);
}
Expand Down

0 comments on commit 93e8fac

Please sign in to comment.