diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62e2931..2dd3b1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: - run: npm run build - run: npm run typecheck - run: npm run lint - - run: npm run format -- --check + - run: npm run format:check - name: package extension run: | diff --git a/package.json b/package.json index 7a10065..19c9a60 100644 --- a/package.json +++ b/package.json @@ -367,6 +367,7 @@ "test": "npm run compile && node ./node_modules/vscode/bin/test", "typecheck": "tsc --noEmit", "format": "prettier --write .", + "format:check": "prettier --check .", "lint": "eslint ." }, "devDependencies": { diff --git a/src/zigMainCodeLens.ts b/src/zigMainCodeLens.ts index b8ca644..50c8f4f 100644 --- a/src/zigMainCodeLens.ts +++ b/src/zigMainCodeLens.ts @@ -56,7 +56,7 @@ function zigRun() { function escapePath(rawPath: string): string { if (/[ !"#$&'()*,;:<>?\[\\\]^`{|}]/.test(rawPath)) { - return `"${rawPath.replaceAll("\"", "\"\\\"\"")}"`; + return `"${rawPath.replaceAll('"', '"\\""')}"`; } return rawPath; }