Repository navigation
Conversation
PowerShell 7 (MSIX) のプロセスから `powershell.exe` を起動すると、PowerShell 7 が設定した PSModulePath を継承する。5.1 はそこで PowerShell 7 版の module set を autoload し、5.1 側の cmdlet を失う。 - `Get-FileHash` が無い → `platforms/windows-11/converge.ps1` の `Get-LockHash` が例外になり `mise-apply` step が error になる。 - `Import-PowerShellDataFile` が無い → `platforms/windows-11/verify.ps1` が 実行できない。 Scheduled Task からは再現しない (task の environment は system のまま) が、 ユーザーが PowerShell 7 の terminal から実行すると必ず再現する。 - `platforms/windows-11/ps-module-path.ps1` に共通処理を置く。 - `converge.ps1` と `verify.ps1` は起動時に module path を machine の値に戻す。 PowerShell 7 は自前の module path を使うため変更しない。 - `scripts/test-ps-module-path.ps1` で、Utility module を空の module で shadow して失敗を再現し、reset 後に Get-FileHash / Import-PowerShellDataFile が解決することを検証する。CI に追加。 Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #287
問題
PowerShell 7 (MSIX) のプロセスから
powershell.exeを起動すると、PowerShell 7 が設定した PSModulePath を継承する。5.1 はそこで PowerShell 7 版の module set を autoload し、5.1 側の cmdlet を失う。Get-FileHash不在 →platforms/windows-11/converge.ps1のGet-LockHashが例外 →mise-applystep が error。Import-PowerShellDataFile不在 →platforms/windows-11/verify.ps1が実行できない。Scheduled Task からは再現しない (task の environment は system のまま) が、PowerShell 7 の terminal から手動実行すると必ず再現する。
変更
platforms/windows-11/ps-module-path.ps1:Reset-WindowsPowerShellModulePathを追加。5.1 のときだけ PSModulePath を machine の値に戻す (PowerShell 7 は自前の module path を使うため変更しない)。platforms/windows-11/converge.ps1/verify.ps1は起動時にこの reset を適用。scripts/test-ps-module-path.ps1: Utility module を空の module で shadow して失敗を再現し、reset 後にGet-FileHash/Import-PowerShellDataFileが解決することを確認する。CI (ci.sh / ci.yml) に追加。検証
scripts/test-ps-module-path.ps1: 全項目 PASS。Co-Authored-By: Claude Code noreply@anthropic.com