Skip to content

Commit 77be584

Browse files
committed
fix: os.execute(installCmd)
1 parent a212ae0 commit 77be584

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

hooks/post_install.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ function install_php_for_windows(sdkPath, version)
3333
major, minor = tonumber(major) or 0, tonumber(minor) or 0
3434

3535
local scriptPath = assert(RUNTIME.pluginDirPath .. "\\bin\\install-windows-php.ps1")
36-
local installCmd = string.format(
37-
'cmd /c cd /d "%%TEMP%%" && powershell -NoProfile -ExecutionPolicy Bypass -File "%s" -Version %s -Arch x64 -CustomPath "%s"',
36+
local installCmd = string.format([[
37+
powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-Location -LiteralPath $env:TEMP; & '%s' -Version '%s' -Arch x64 -CustomPath '%s'"
38+
]],
3839
scriptPath,
3940
version,
4041
sdkPath

0 commit comments

Comments
 (0)