File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -838,14 +838,18 @@ function get_magic_bytes_pretty($file, $glue = ' ') {
838838# for all communication with api.github.com
839839Optimize-SecurityProtocol
840840
841- $scoopdir = $ env: SCOOP , (get_config ' rootPath ' ) , " $ env: USERPROFILE \scoop " | Select-Object - first 1
842- $globaldir = $env: SCOOP_GLOBAL , (get_config ' globalPath ' ), " $env: ProgramData \scoop" | Select-Object - first 1
841+ # Scoop root directory
842+ $scoopdir = $env: SCOOP , (get_config ' rootPath ' ), " $env: USERPROFILE \scoop" | Where-Object { -not [ String ]::IsNullOrEmpty( $_ ) } | Select-Object - First 1
843843
844+ # Scoop global apps directory
845+ $globaldir = $env: SCOOP_GLOBAL , (get_config ' globalPath' ), " $env: ProgramData \scoop" | Where-Object { -not [String ]::IsNullOrEmpty($_ ) } | Select-Object - first 1
846+
847+ # Scoop cache directory
844848# Note: Setting the SCOOP_CACHE environment variable to use a shared directory
845849# is experimental and untested. There may be concurrency issues when
846850# multiple users write and access cached files at the same time.
847851# Use at your own risk.
848- $cachedir = $env: SCOOP_CACHE , (get_config ' cachePath' ), " $scoopdir \cache" | Select-Object - first 1
852+ $cachedir = $env: SCOOP_CACHE , (get_config ' cachePath' ), " $scoopdir \cache" | Where-Object { -not [ String ]::IsNullOrEmpty( $_ ) } | Select-Object - first 1
849853
850854# Scoop config file migration
851855$configHome = $env: XDG_CONFIG_HOME , " $env: USERPROFILE \.config" | Select-Object - First 1
You can’t perform that action at this time.
0 commit comments