@oneciel-ai/ciel-runtime 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/install.ps1
CHANGED
|
@@ -24,6 +24,26 @@ Copy-Item -Force "ciel-runtime-stop" (Join-Path $binDir "ciel-runtime-stop")
|
|
|
24
24
|
Copy-Item -Force "ciel-runtime-stop.cmd" (Join-Path $binDir "ciel-runtime-stop.cmd")
|
|
25
25
|
Copy-Item -Force "ciel-runtime-stop.ps1" (Join-Path $binDir "ciel-runtime-stop.ps1")
|
|
26
26
|
|
|
27
|
+
$expandedBinDir = [Environment]::ExpandEnvironmentVariables($binDir).TrimEnd('\')
|
|
28
|
+
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
29
|
+
$seenPathEntries = [System.Collections.Generic.HashSet[string]]::new([System.StringComparer]::OrdinalIgnoreCase)
|
|
30
|
+
$cleanPathEntries = [System.Collections.Generic.List[string]]::new()
|
|
31
|
+
[void]$seenPathEntries.Add($expandedBinDir)
|
|
32
|
+
$cleanPathEntries.Add($binDir.TrimEnd('\'))
|
|
33
|
+
foreach ($entry in ([string]$userPath -split ';')) {
|
|
34
|
+
$value = $entry.Trim()
|
|
35
|
+
if (-not $value) { continue }
|
|
36
|
+
$identity = [Environment]::ExpandEnvironmentVariables($value).TrimEnd('\')
|
|
37
|
+
if ($seenPathEntries.Add($identity)) {
|
|
38
|
+
$cleanPathEntries.Add($value)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
$nextUserPath = $cleanPathEntries -join ';'
|
|
42
|
+
if ($nextUserPath -ne $userPath) {
|
|
43
|
+
[Environment]::SetEnvironmentVariable("Path", $nextUserPath, "User")
|
|
44
|
+
}
|
|
45
|
+
|
|
27
46
|
Write-Host "Installed Ciel Runtime to $shareDir"
|
|
28
|
-
Write-Host "
|
|
47
|
+
Write-Host "Registered $binDir at the front of the user PATH."
|
|
48
|
+
Write-Host "Open a new terminal window if the current terminal has an older PATH snapshot."
|
|
29
49
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|