Skip to content

Commit 67dc99b

Browse files
committed
fix: complete literal workspace handling
1 parent ec572d6 commit 67dc99b

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

scripts/check-homogeneity.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[CmdletBinding()]
55
param(
66
[string]$TargetDir = $(if ($env:HOME) { $env:HOME } else { $env:USERPROFILE }),
7-
[string]$WorkspaceName = '',
87
[switch]$Json,
98
[switch]$DryRun,
109
[string]$ApplyPatch = '',

scripts/init-stats.ps1

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# init-stats.ps1 — STATS.md Baseline-Generator v1.0 (PowerShell)
33
# FR-REV-B04; Contract: init-stats-cli.md
44
#
5-
# Usage: pwsh scripts/init-stats.ps1 [-WorkspaceName <string>]
5+
# Usage: pwsh scripts/init-stats.ps1 [-WorkspaceName <name-or-path>]
66
# Exit codes: 0=success, 1=error
77
[CmdletBinding()]
88
param(
@@ -51,13 +51,15 @@ function Write-StatsEntry {
5151
$entry = "| $timestamp | $Score% | $bar |"
5252

5353
$dir = Split-Path $StatsFile -Parent
54-
if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir -Force | Out-Null }
54+
if (-not (Test-Path -LiteralPath $dir)) {
55+
New-Item -ItemType Directory -Path $dir -Force | Out-Null
56+
}
5557

56-
if (Test-Path $StatsFile) {
57-
Add-Content -Path $StatsFile -Value $entry
58+
if (Test-Path -LiteralPath $StatsFile) {
59+
Add-Content -LiteralPath $StatsFile -Value $entry
5860
} else {
59-
$StatsHeader | Set-Content -Path $StatsFile
60-
Add-Content -Path $StatsFile -Value $entry
61+
$StatsHeader | Set-Content -LiteralPath $StatsFile
62+
Add-Content -LiteralPath $StatsFile -Value $entry
6163
}
6264
Write-Host "✓ STATS.md updated at $StatsFile"
6365
}
@@ -78,12 +80,12 @@ function Resolve-TargetDir {
7880
param([string]$InputPath)
7981

8082
if (Test-Path -LiteralPath $InputPath -PathType Container) {
81-
return (Resolve-Path $InputPath).Path
83+
return (Resolve-Path -LiteralPath $InputPath).Path
8284
}
8385

8486
$homeCandidate = Join-Path $HomeDir $InputPath
8587
if (Test-Path -LiteralPath $homeCandidate -PathType Container) {
86-
return (Resolve-Path $homeCandidate).Path
88+
return (Resolve-Path -LiteralPath $homeCandidate).Path
8789
}
8890

8991
return $null

0 commit comments

Comments
 (0)