diff --git a/lib/core.ps1 b/lib/core.ps1 index 6d862f2757..d2dbec12f1 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -1,6 +1,6 @@ $scoopdir = $env:SCOOP, "~\appdata\local\scoop" | select-object -first 1 $globaldir = $env:SCOOP_GLOBAL, "$($env:programdata.tolower())\scoop" | select-object -first 1 -$cachedir = "$scoopdir\cache" # always local +#$cachedir = "$scoopdir\cache" # always local $CMDenvpipe = $env:SCOOP__CMDenvpipe @@ -135,10 +135,10 @@ function shim($path, $global, $name, $arg) { $shim = "$abs_shimdir\$($name.tolower()).ps1" - # convert to relative path - push-location $abs_shimdir - $relative_path = resolve-path -relative $path - pop-location + # # convert to relative path + # push-location $abs_shimdir + # $relative_path = resolve-path -relative $path + # pop-location write-output '# ensure $HOME is set for MSYS programs' | out-file $shim -encoding oem write-output "if(!`$env:home) { `$env:home = `"`$home\`" }" | out-file $shim -encoding oem -append diff --git a/lib/decompress.ps1 b/lib/decompress.ps1 index 4a2876284d..06f4d859d0 100644 --- a/lib/decompress.ps1 +++ b/lib/decompress.ps1 @@ -11,7 +11,7 @@ function file_requires_7zip($fname) { } function extract_7zip($path, $to, $recurse) { - $output = 7z x "$path" -o"$to" -y + $null = 7z x "$path" -o"$to" -y if($lastexitcode -ne 0) { abort "exit code was $lastexitcode" } # check for tar diff --git a/lib/install.ps1 b/lib/install.ps1 index 2b9a7dec70..f8fed84a67 100644 --- a/lib/install.ps1 +++ b/lib/install.ps1 @@ -419,7 +419,7 @@ function msi_installed($code) { $name = $key.getvalue('displayname') $version = $key.getvalue('displayversion') $classkey = "IdentifyingNumber=`"$code`",Name=`"$name`",Version=`"$version`"" - try { $wmi = [wmi]"Win32_Product.$classkey"; $true } catch { $false } + try { $null = [wmi]"Win32_Product.$classkey"; $true } catch { $false } } function install_prog($fname, $dir, $installer) {