JustinGrote / JustinGrote/ModuleFast

Update Profile with ModuleFast module path reports successful even if profile doesnt exist

オープン
#82 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
C#
スター
151
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

説明

This happened in vscode remoting to a windows machine but may be present elsewhere:

```
PS C:\Users\ESRT-Allied\Documents\PowerShell\Scripts> imf -verbose
VERBOSE: Updating PSModulePath to include C:\Users\ESRT-Allied\AppData\Local\powershell\Modules
VERBOSE: Using relative path $([environment]::GetFolderPath('LocalApplicationData'))\powershell\Modules instead of 'C:\Users\ESRT-Allied\AppData\Local\powershell\Modules' in profile
VERBOSE: Checked for relative destination
VERBOSE: PSModulePath $([environment]::GetFolderPath('LocalApplicationData'))\powershell\Modules already in profile, skipping...
VERBOSE: 🔎 No modules specified to install. Beginning SpecFile detection...
Install-ModuleFast: Could not find any required spec files in C:\Users\ESRT-Allied\Documents\PowerShell\Scripts. Verify the path is correct or provide Module Specifications either via -Path or -Specification
PS C:\Users\ESRT-Allied\Documents\PowerShell\Scripts> $profile
C:\Users\ESRT-Allied\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
PS C:\Users\ESRT-Allied\Documents\PowerShell\Scripts> cat $profile
Get-Content: Cannot find path 'C:\Users\ESRT-Allied\Documents\PowerShell\Microsoft.PowerShell_profile.ps1' because it does not exist.
PS C:\Users\ESRT-Allied\Documents\PowerShell\Scripts> gc -raw $profile
Get-Content: Cannot find path 'C:\Users\ESRT-Allied\Documents\PowerShell\Microsoft.PowerShell_profile.ps1' because it does not exist.
PS C:\Users\ESRT-Allied\Documents\PowerShell\Scripts> gc -raw $profile.CurrentUserAllHosts
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start at the imf/Install-ModuleFast entry point and reproduce the verbose profile update with the reported missing $profile path. Check how the command determines whether the profile contains PSModulePath; done means its success report matches whether the profile actually exists and was updated.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell
領域
cli, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。