clink-flex-prompt@0.18: fix clink script path (#7171)

The path installed via clink installscripts was different for each
version of clink-flex-prompt, creating issues as the same script was
loaded multiple times (with different version).

This change makes the path consistent across versions, making sure only
the latest one is loaded.

Closes #7170
This commit is contained in:
Nicolas Arnaud-Cormos 2025-11-12 12:10:28 +01:00 committed by GitHub
parent 6cd2bb858f
commit 892dd302ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,10 +15,11 @@
],
"installer": {
"script": [
"$luapath = Join-Path (Split-Path -Path \"$dir\" -Parent) \"current\"",
"if (Get-Command clink -ErrorAction SilentlyContinue) {",
" clink installscripts \"$dir\"",
" clink installscripts \"$luapath\"",
"} elseif ($Env:CMDER_ROOT) {",
" & \"$Env:CMDER_ROOT\\vendor\\clink\\clink.bat\" installscripts \"$dir\"",
" & \"$Env:CMDER_ROOT\\vendor\\clink\\clink.bat\" installscripts \"$luapath\"",
"} else {",
" warn 'Clink or Cmder installation not found. Please manually install these scripts.'",
"}"
@ -26,10 +27,11 @@
},
"uninstaller": {
"script": [
"$luapath = Join-Path (Split-Path -Path \"$dir\" -Parent) \"current\"",
"if (Get-Command clink -ErrorAction SilentlyContinue) {",
" clink uninstallscripts \"$dir\"",
" clink uninstallscripts \"$luapath\"",
"} elseif ($Env:CMDER_ROOT) {",
" & \"$Env:CMDER_ROOT\\vendor\\clink\\clink.bat\" uninstallscripts \"$dir\"",
" & \"$Env:CMDER_ROOT\\vendor\\clink\\clink.bat\" uninstallscripts \"$luapath\"",
"}"
]
},