Skip to content

Commit 6cb99a4

Browse files
committed
fix: fallback to root dir for windows install script
1 parent 145de4e commit 6cb99a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/install.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
$RootDir = Resolve-Path -Path ((Split-Path $MyInvocation.MyCommand.Path) + "\..")
12
$InstallDir = $args[0]
3+
4+
if (-not $InstallDir) {
5+
$InstallDir = $RootDir
6+
}
7+
28
$BinDir = "$InstallDir\bin"
39
$OutFile = "$BinDir\vim-doge-helper.exe"
410

@@ -14,7 +20,6 @@ else {
1420
$AssetName = "vim-doge-helper-windows-x86_64.zip"
1521
}
1622

17-
$RootDir = Resolve-Path -Path ((Split-Path $MyInvocation.MyCommand.Path) + "\..")
1823
$AppVersion = Get-Content "$RootDir\.version"
1924

2025
$AssetPath = "$RootDir\bin\$AssetName"

0 commit comments

Comments
 (0)