helix: Scooping config file path (#4949)

* Added config parameter to Helix shim

- Add suggestion 'extras/vcredist2022'
- Add migration script
---------

Co-authored-by: HUMORCE <humorce@outlook.com>
This commit is contained in:
Michael R. Taylor 2023-07-22 03:23:32 -05:00 committed by GitHub
parent f9260a393c
commit 7361130657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,9 @@
"description": "A post-modern modal text editor",
"homepage": "https://helix-editor.com",
"license": "MPL-2.0",
"suggest": {
"vcredist": "extras/vcredist2022"
},
"architecture": {
"64bit": {
"url": "https://github.com/helix-editor/helix/releases/download/23.05/helix-23.05-x86_64-windows.zip",
@ -10,11 +13,27 @@
"extract_dir": "helix-23.05-x86_64-windows"
}
},
"pre_install": [
"# NOTE: Remove the migration script after 6 months (2024-01-22)",
"if ((Test-Path \"$env:APPDATA\\helix\\config.toml\") -and (!(Test-Path \"$persist_dir\\config.toml\"))) {",
" info 'Migrating config file...'",
" info \"Previous config path: '$env:APPDATA\\helix\\config.toml'\"",
" info \"Current config path: '$persist_dir\\config.toml'\"",
" ensure \"$persist_dir\"",
" Copy-Item \"$env:APPDATA\\helix\\config.toml\" \"$persist_dir\\config.toml\"",
"}",
"# END"
],
"bin": [
"hx.exe",
[
"hx.exe",
"helix"
"hx",
"--config \"$persist_dir\\config.toml\""
],
[
"hx.exe",
"helix",
"--config \"$persist_dir\\config.toml\""
]
],
"checkver": {