From 748cf3ca1cd162ca15de81aea620786416bca867 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 10 Jun 2024 12:22:11 -0400 Subject: [PATCH] fix: Pass mainModule URI to git -C This way git can fail and we fall back to the URL, rather than have Deno crash. --- bids-validator/src/version.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bids-validator/src/version.ts b/bids-validator/src/version.ts index 12294933f..5f864a3a9 100644 --- a/bids-validator/src/version.ts +++ b/bids-validator/src/version.ts @@ -36,9 +36,8 @@ export async function getVersion(): Promise { async function getLocalVersion(path: string): Promise { 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()