Skip to content

Commit d670a31

Browse files
committed
Fix install script to run with powershell 5.1
1 parent d547e11 commit d670a31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Src/Scripts/Install-IronPython.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if (-not $unzipDir) {
9898
}
9999

100100
# Copy files into place
101-
Copy-Item -Path (Join-Path $unzipDir $Framework "*") -Destination $Path -Recurse
101+
Copy-Item -Path (Join-Path $unzipDir (Join-Path $Framework "*")) -Destination $Path -Recurse
102102
Copy-Item -Path (Join-Path $unzipDir "lib") -Destination $Path -Recurse
103103

104104
# Prepare startup scripts
@@ -108,6 +108,12 @@ if ($Framework -notlike "net4*") {
108108
#!/usr/bin/env pwsh
109109
dotnet (Join-Path $PSScriptRoot ipy.dll) @args
110110
'@
111+
if ($PSVersionTable.PSEdition -eq "Desktop" -or $IsWindows) {
112+
$ipyPath = Join-Path $Path "ipy.bat"
113+
Set-Content -Path $ipyPath -Value @'
114+
@dotnet "%~dp0ipy.dll" %*
115+
'@
116+
}
111117
if ($IsMacOS -or $IsLinux) {
112118
chmod +x $ipyPath
113119
chmod +x (Join-Path $Path "ipy.sh")

0 commit comments

Comments
 (0)