Skip to content

Commit b591e42

Browse files
committed
fix: 修正Pester配置中错误的文件路径引号并更新安装脚本
修正PesterConfiguration.ps1中错误的文件路径引号格式,从弯引号改为直引号 重构install.ps1脚本,移除旧的软连接创建逻辑,改为根据系统类型加载不同的配置文件
1 parent 0ca0f59 commit b591e42

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎PesterConfiguration.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $config = @{
4242
# OutputPath = "./coverge.xml"
4343
OutputFormat = 'CoverageGutters'
4444
ExcludeFromCodeCoverage = @(
45-
’./psutils/modules/error.psm1‘
45+
'./psutils/modules/error.psm1'
4646
'./psutils/modules/linux.psm1'
4747
'./psutils/modules/network.psm1'
4848
'./psutils/modules/proxy.psm1'
@@ -65,4 +65,4 @@ $config = @{
6565
$newConfig = New-PesterConfiguration -Hashtable $config
6666

6767

68-
$newConfig
68+
$newConfig

‎install.ps1‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,20 @@ else {
4949
}
5050

5151

52-
$traeRulesFilePath = "$PSScriptRoot/.trae/rules/project_rules.md"
53-
$lingmaRulesFilePath = "$PSScriptRoot/.lingma/rules/project_rules.md"
54-
# 软连接不存在时创建
55-
if (-not (Test-Path -Path $lingmaRulesFilePath)) {
56-
New-Item -ItemType SymbolicLink -Path $lingmaRulesFilePath -Target $traeRulesFilePath
57-
}
52+
# $traeRulesFilePath = "$PSScriptRoot/.trae/rules/project_rules.md"
53+
# $lingmaRulesFilePath = "$PSScriptRoot/.lingma/rules/project_rules.md"
54+
# # 软连接不存在时创建
55+
# if (-not (Test-Path -Path $lingmaRulesFilePath)) {
56+
# New-Item -ItemType SymbolicLink -Path $lingmaRulesFilePath -Target $traeRulesFilePath
57+
# }
58+
5859

60+
if ($IsWindows) {
61+
Write-Verbose "当前环境为 Windows,将执行 Windows 特定配置"
62+
./profile/profile.ps1 -loadProfile
63+
}
64+
else {
65+
Write-Verbose "当前环境为 Unix 或类 Unix 系统,将执行 Unix 特定配置"
66+
./profile/profile_unix.ps1 -loadProfile
67+
}
5968

60-
# 载入配置文件
61-
./profile/profile.ps1 -loadProfile

0 commit comments

Comments
 (0)