clink-completions@0.6.2: fix clink script path (#6577)

The path installed via `clink installscripts` was different for each
version of clink-completions, 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.

Co-authored-by: Nicolas Arnaud-Cormos <nicolas.arnaud-cormos@kdab.com>
This commit is contained in:
Nicolas Arnaud-Cormos 2025-04-16 06:30:34 +02:00 committed by GitHub
parent d0e8ac44f9
commit 106015f805
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,8 +11,9 @@
"extract_dir": "clink-completions-0.6.2", "extract_dir": "clink-completions-0.6.2",
"installer": { "installer": {
"script": [ "script": [
"$luapath = Join-Path (Split-Path -Path \"$dir\" -Parent) \"current\"",
"if (Get-Command clink -ErrorAction SilentlyContinue) {", "if (Get-Command clink -ErrorAction SilentlyContinue) {",
" clink installscripts \"$dir\"", " clink installscripts \"$luapath\"",
"} else {", "} else {",
" warn 'Clink installation not found. Please manually install these scripts.'", " warn 'Clink installation not found. Please manually install these scripts.'",
"}" "}"
@ -20,8 +21,9 @@
}, },
"uninstaller": { "uninstaller": {
"script": [ "script": [
"$luapath = Join-Path (Split-Path -Path \"$dir\" -Parent) \"current\"",
"if (Get-Command clink -ErrorAction SilentlyContinue) {", "if (Get-Command clink -ErrorAction SilentlyContinue) {",
" clink uninstallscripts \"$dir\"", " clink uninstallscripts \"$luapath\"",
"}" "}"
] ]
}, },