Skip to content

Commit aa72ad8

Browse files
committed
fix(install): 修复 Linux 安装测试夹具
1 parent 57dbd30 commit aa72ad8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/Install.Tests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Set-StrictMode -Version Latest
33
Describe 'install.ps1' {
44
BeforeEach {
55
$script:ProjectRoot = Split-Path -Parent $PSScriptRoot
6-
$script:TempRoot = Join-Path ([System.IO.Path]::GetTempPath()) ("Install.Tests.{0}" -f [System.Guid]::NewGuid())
6+
# Linux 容器里的 /tmp 可能挂载为不可执行,mock 外部命令需放在工作区内。
7+
$script:TempRoot = Join-Path $script:ProjectRoot (".install-tests.{0}" -f [System.Guid]::NewGuid())
78
New-Item -ItemType Directory -Path $script:TempRoot -Force | Out-Null
89

910
Copy-Item -Path (Join-Path $script:ProjectRoot 'install.ps1') -Destination (Join-Path $script:TempRoot 'install.ps1') -Force

0 commit comments

Comments
 (0)