mirror of
https://github.com/ScoopInstaller/Main.git
synced 2026-02-24 04:14:41 +00:00
cheat: Prevent overwriting existing config (#7647)
This commit is contained in:
parent
cad86ecb4a
commit
aeef0bfeb5
@ -23,9 +23,12 @@
|
||||
"}"
|
||||
],
|
||||
"post_install": [
|
||||
"# For the cheatsheets path to be set correctly, the configuration file should be initialized after the environment variables are set.",
|
||||
"$file = 'conf.yml'",
|
||||
"$CONT = $(& \"$dir\\cheat\" --init) -replace 'editor: EDITOR_PATH', 'editor: notepad' -replace 'pager: PAGER_PATH', 'pager: more'",
|
||||
"Set-Content \"$dir\\$file\" $CONT -Encoding ASCII"
|
||||
"if ((Get-Item \"$dir\\$file\").Length -eq 0) {",
|
||||
" $CONT = $(& \"$dir\\cheat\" --init) -replace 'editor: EDITOR_PATH', 'editor: notepad' -replace 'pager: PAGER_PATH', 'pager: more'",
|
||||
" Set-Content \"$dir\\$file\" $CONT -Encoding ASCII",
|
||||
"}"
|
||||
],
|
||||
"env_set": {
|
||||
"CHEAT_CONFIG_PATH": "$dir\\conf.yml"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user