Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Experimental Feature PSContentPath#26509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jshigetomi wants to merge19 commits intoPowerShell:master
base:master
Choose a base branch
Loading
fromjshigetomi:PSModulePathFix
Open
Changes from1 commit
Commits
Show all changes
19 commits
Select commitHold shift + click to select a range
b73eea5
Testing
Mar 13, 2025
805fd0e
Update PSModulePath
Mar 17, 2025
6dc662d
Add Experimental feature for PSContent
jshigetomiAug 6, 2025
67a18aa
Merge branch 'master' into PSModulePathFix
jshigetomiAug 6, 2025
4a7bb3d
Removed unused variables
jshigetomiAug 6, 2025
00b6307
Switch to default PSContentPath LOCALAPPData, cmdlets added
jshigetomiAug 20, 2025
7e5802b
Add lazy migration
jshigetomiOct 2, 2025
830016e
Add null checks incase PSUserContentPath fails to get any value
jshigetomiOct 9, 2025
56acf2d
Able to use expanded environmental variables
jshigetomiOct 14, 2025
3f5709d
Remove help URI
jshigetomiOct 14, 2025
9e516fa
Reassign perUserConfigDirectory if experimental feature is enabled wh…
jshigetomiOct 14, 2025
d371979
Move migration to GetPSContentPath API, added safety fallbacks to def…
jshigetomiNov 21, 2025
c62f82a
Merge branch 'master' into PSModulePathFix
jshigetomiNov 21, 2025
b207b5c
Add tests
jshigetomiDec 1, 2025
8fc45c7
Merge branch 'PSModulePathFix' of https://github.com/jshigetomi/Power…
jshigetomiDec 1, 2025
fb2036c
Merge branch 'master' into PSModulePathFix
jshigetomiDec 1, 2025
eaaaedd
Add initial test cases for PSContentPath
jshigetomiDec 1, 2025
eed1cf3
Fix expanding env variable test
jshigetomiDec 12, 2025
ec18785
Separate commands for env var test
jshigetomiDec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Fix expanding env variable test
  • Loading branch information
@jshigetomi
jshigetomi committedDec 12, 2025
commiteed1cf342aad9f7d721bac82e86bbbbc9fd5e356
23 changes: 18 additions & 5 deletionstest/powershell/engine/PSContentPath.Tests.ps1
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -127,15 +127,28 @@ Describe "Get-PSContentPath and Set-PSContentPath cmdlet tests" -tags "CI" {
}

It "Get-PSContentPath expands environment variables (%TEMP%)" -Skip:(!$IsWindows -or $skipNoPwsh) {
# Enable feature and set path with environment variable
& $powershell -noprofile -command "Enable-ExperimentalFeature -Name PSContentPath -Scope CurrentUser; Set-PSContentPath -Path '%TEMP%\PowerShell'"
# Run in single session to avoid migration interference
$script = @"
`$ErrorActionPreference = 'Stop'
Enable-ExperimentalFeature -Name PSContentPath -Scope CurrentUser -WarningAction Ignore
Set-PSContentPath -Path '%TEMP%\PowerShell' -ErrorAction Stop
Get-PSContentPath
"@
$result = & $powershell -noprofile -command $script 2>&1

$result = & $powershell -noprofile -command 'Get-PSContentPath'
$result | Should -Not -Contain '%'
# Filter out any error messages, just get the path
$pathResult = $result | Where-Object { $_ -is [string] -and $_ -notmatch '^Set-PSContentPath:' } | Select-Object -Last 1

if (-not $pathResult) {
Write-Host "Command output: $result" -ForegroundColor Red
throw "Set-PSContentPath or Get-PSContentPath failed"
}

$pathResult | Should -Not -Contain '%'

# Normalize paths for comparison (handles short path names like RUNNER~1)
$expectedPath = [System.IO.Path]::GetFullPath((Join-Path $env:TEMP "PowerShell"))
$actualPath = [System.IO.Path]::GetFullPath($result)
$actualPath = [System.IO.Path]::GetFullPath($pathResult)
$actualPath | Should -Be $expectedPath
}

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp