Skip to content

Commit

Permalink
fix: Pass mainModule URI to git -C
Browse files Browse the repository at this point in the history
This way git can fail and we fall back to the URL, rather than have Deno
crash.
  • Loading branch information
effigies committed Jun 10, 2024
1 parent 02f8128 commit 748cf3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bids-validator/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ export async function getVersion(): Promise<string> {

async function getLocalVersion(path: string): Promise<string> {
const p = Deno.run({
cmd: ['git', 'describe', '--tags', '--always'],
cmd: ['git', '-C', path, 'describe', '--tags', '--always'],
stdout: 'piped',
cwd: path,
})
const description = new TextDecoder().decode(await p.output()).trim()
p.close()
Expand Down

0 comments on commit 748cf3c

Please sign in to comment.