Skip to content

Commit f6fe907

Browse files
committed
fix: handle multiple remotes
1 parent d12a540 commit f6fe907

File tree

5 files changed

+331
-389
lines changed

5 files changed

+331
-389
lines changed
File renamed without changes.

.yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: node-modules
22

3-
yarnPath: .yarn/releases/yarn-4.5.0.cjs
3+
yarnPath: .yarn/releases/yarn-4.5.0.cjs

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
"build-info",
2121
"buildstamp"
2222
],
23-
"license": "MIT",
24-
"packageManager": "[email protected]"
23+
"license": "MIT"
2524
}

packages/core/src/main/ts/buildstamp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const getGitInfo = async (cwd: string, env: Record<string, string | undef
7070
}
7171

7272
const getGitRepoUrl = async (cwd: string): Promise<string> => {
73-
const { stdout: git_remote } = await spawn('git', ['remote', 'show'], cwd)
73+
const git_remote = (await spawn('git', ['remote', 'show'], cwd)).stdout.split('\n')[0]
7474
const { stdout: git_repo_url } = await spawn('git', ['config', '--get', `remote.${git_remote}.url`], cwd)
7575
return git_repo_url
7676
}

0 commit comments

Comments
 (0)