Skip to content

Commit 0faf2d8

Browse files
committed
feat: use portable config
1 parent ff4eedd commit 0faf2d8

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

install.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,13 @@ $SCOOP_APP_DIR = "$SCOOP_DIR\apps\scoop\current"
694694
# Scoop main bucket directory
695695
$SCOOP_MAIN_BUCKET_DIR = "$SCOOP_DIR\buckets\main"
696696
# Scoop config file location
697-
$SCOOP_CONFIG_HOME = $env:XDG_CONFIG_HOME, "$env:USERPROFILE\.config" | Select-Object -First 1
698-
$SCOOP_CONFIG_FILE = "$SCOOP_CONFIG_HOME\scoop\config.json"
697+
if ($SCOOP_DIR) {
698+
$SCOOP_CONFIG_HOME = $SCOOP_DIR
699+
$SCOOP_CONFIG_FILE = "$SCOOP_DIR\config.json"
700+
} else {
701+
$SCOOP_CONFIG_HOME = $env:XDG_CONFIG_HOME, "$env:USERPROFILE\.config" | Select-Object -First 1
702+
$SCOOP_CONFIG_FILE = "$SCOOP_CONFIG_HOME\scoop\config.json"
703+
}
699704

700705
# TODO: Use a specific version of Scoop and the main bucket
701706
$SCOOP_PACKAGE_REPO = 'https://github.com/ScoopInstaller/Scoop/archive/master.zip'

0 commit comments

Comments
 (0)