diff --git a/lib/unix.ps1 b/lib/unix.ps1 index b2699a98..e38cd840 100644 --- a/lib/unix.ps1 +++ b/lib/unix.ps1 @@ -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) { diff --git a/test/Scoop-TestLib.ps1 b/test/Scoop-TestLib.ps1 index 1ebc02ff..e72d72e9 100644 --- a/test/Scoop-TestLib.ps1 +++ b/test/Scoop-TestLib.ps1 @@ -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 }