mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-08-25 15:46:47 +00:00
Don't set $env:TEMP on unix, instead use /tmp as workingdir for tests
This commit is contained in:
@@ -13,7 +13,6 @@ if(!(is_unix)) {
|
||||
$scoopdir = $env:SCOOP, (Join-Path $env:HOME "scoop") | select -first 1
|
||||
$globaldir = $env:SCOOP_GLOBAL, "/usr/local/scoop" | select -first 1
|
||||
$cachedir = $env:SCOOP_CACHE, (Join-Path $scoopdir "cache") | select -first 1
|
||||
$env:TEMP = "/tmp"
|
||||
|
||||
# core.ps1
|
||||
function ensure($dir) {
|
||||
|
||||
@@ -73,7 +73,12 @@ function setup_working($name) {
|
||||
}
|
||||
|
||||
# reset working dir
|
||||
$working_dir = "$env:TEMP/ScoopTestFixtures/$name"
|
||||
if($PSVersionTable.Platform -eq 'Unix') {
|
||||
$working_dir = "/tmp/ScoopTestFixtures/$name"
|
||||
} else {
|
||||
$working_dir = "$env:TEMP/ScoopTestFixtures/$name"
|
||||
}
|
||||
|
||||
if(test-path $working_dir) {
|
||||
Remove-Item -Recurse -Force $working_dir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user