Skip to content

Commit 510e6a3

Browse files
committed
Fix NPM package version stamping in paths with spaces
Fixes #99
1 parent f84cef1 commit 510e6a3

File tree

1 file changed

+1
-1
lines changed
  • src/nerdbank-gitversioning.npm/ts

1 file changed

+1
-1
lines changed

src/nerdbank-gitversioning.npm/ts/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface IGitVersion {
4343
export async function getVersion(projectDirectory?: string): Promise<IGitVersion> {
4444
projectDirectory = projectDirectory || '.';
4545
var getVersionScriptPath = path.join(__dirname, nbgvPath, "tools", "Get-Version.ps1");
46-
var versionText = await execAsync(`powershell -ExecutionPolicy Bypass -Command (${getVersionScriptPath} -ProjectDirectory "${projectDirectory}")`)
46+
var versionText = await execAsync(`powershell -ExecutionPolicy Bypass -Command "& '${getVersionScriptPath}' -ProjectDirectory '${projectDirectory}'"`)
4747
if (versionText.stderr) {
4848
throw versionText.stderr;
4949
}

0 commit comments

Comments
 (0)