Skip to content

Commit 4e6a606

Browse files
committed
fix: use pwsh instead of powershell for Windows install
Windows PowerShell 5.1 (powershell.exe) doesn't support 3+ arguments to Join-Path, which the install script uses. PowerShell 7 (pwsh) is available on GitHub Actions runners and handles this correctly.
1 parent aee42c2 commit 4e6a606

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ vp run fmt
3434
vp run fmt:check
3535
```
3636

37-
**Important:** Always run `vp run build` after code changes - the `dist/index.mjs` must be committed.
37+
**Important:** Always run `vp fmt` and `vp run build` before committing - the `dist/index.mjs` must be committed.
3838

3939
## Architecture
4040

dist/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/install-viteplus.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ export async function installVitePlus(inputs: Inputs): Promise<void> {
1515
let exitCode: number;
1616

1717
if (process.platform === "win32") {
18-
exitCode = await exec("powershell", ["-Command", `& ([scriptblock]::Create((irm ${INSTALL_URL_PS1})))`], { env });
18+
exitCode = await exec(
19+
"pwsh",
20+
["-Command", `& ([scriptblock]::Create((irm ${INSTALL_URL_PS1})))`],
21+
{ env },
22+
);
1923
} else {
2024
exitCode = await exec("bash", ["-c", `curl -fsSL ${INSTALL_URL_SH} | bash`], { env });
2125
}

0 commit comments

Comments
 (0)