diff --git a/bucket/cheat.json b/bucket/cheat.json index cd0926c144..5bd7d37940 100644 --- a/bucket/cheat.json +++ b/bucket/cheat.json @@ -14,8 +14,7 @@ "$file = 'conf.yml'", "if (!(Test-Path \"$persist_dir\\$file\")) {", " Write-Host 'File' $file 'does not exists. Creating.' -f Yellow", - " $CONT = $(& \"$dir\\cheat\" --init) -replace 'editor: vim', 'editor: notepad' -replace 'cheatsheets/', \"$persist_dir/cheatsheets/\"", - " Set-Content \"$dir\\$file\" ($CONT -replace '\\\\', '/') -Encoding ASCII", + " New-Item -ItemType File -Force -Path \"$dir\\$file\" | Out-Null", "}", "if (!(Test-Path \"$persist_dir\\cheatsheets\")) {", " Write-Host 'Adding community cheatsheets...' -f Yellow", @@ -23,6 +22,11 @@ " git clone -q 'https://github.com/cheat/cheatsheets.git' \"$persist_dir\\cheatsheets\\community\"", "}" ], + "post_install": [ + "$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" + ], "env_set": { "CHEAT_CONFIG_PATH": "$dir\\conf.yml" },