Skip to content

Commit 91c04cb

Browse files
committed
support scoop installation location
1 parent d21aee9 commit 91c04cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

powershell/command_palette_installer.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ if (Test-Path env:MPV_CONFIG_DIR) {
2323
} elseif (Test-Path "$env:APPDATA/mpv") {
2424
Write-Output "Installing into (current mpv user config):"
2525
$ConfigDir = "$env:APPDATA/mpv"
26+
} elseif ((Get-Command scoop -ea SilentlyContinue) -and (Test-Path (scoop which mpv))) {
27+
Write-Output "Installing into scoop installation location"
28+
$path = Join-Path (Split-Path (scoop which mpv)) "portable_config"
29+
New-Item -ItemType Directory -Path $path -ea SilentlyContinue | Out-Null
30+
$ConfigDir = Resolve-Path $path
2631
} else {
2732
Write-Output "Installing into current directory:"
2833
$ConfigDir = "$PWD"

0 commit comments

Comments
 (0)