Closed ninmonkey closed 8 months ago
In case it helps, here's the full contents
$Env:PSModulePath = @(
$Env:PSModulePath
$toAdd = gi 'E:\PSModulePath.2023.root\Main' # assume this exists
) | Join-String -sep ([IO.Path]::PathSeparator)
# $Profile.CurrentUserAllHosts: shared (all3): VSCode, VSCode Debug Term, and windows term (external)
if($global:__nin_enableTraceVerbosity) { "⊢🐸 ↪ enter Pid: '$pid' `"$PSCommandPath`". source: VsCode, term: regular, prof: AllUsersCurrentHost" | Write-Warning; }[Collections.Generic.List[Object]]$global:__ninPathInvokeTrace ??= @(); $global:__ninPathInvokeTrace.Add($PSCommandPath); <# 2023.02 #>
. (Get-Item -ea 'continue' (Join-Path $Env:Nin_Dotfiles 'pwsh/profile.ps1'))
if($global:__nin_enableTraceVerbosity) { "⊢🐸 ↩ exit Pid: '$pid' `"$PSCommandPath`". source: VsCode, term: regular, prof: AllUsersCurrentHost" | Write-Warning; }[Collections.Generic.List[Object]]$global:__ninPathInvokeTrace ??= @(); $global:__ninPathInvokeTrace.Add($PSCommandPath); <# 2023.02 #>
if ('$Destination' -notin ($env:PSModulePath.split([IO.Path]::PathSeparator))) { `$env:PSModulePath = '$Destination' + $([IO.Path]::PathSeparator + $env:PSModulePath) } <#Added by ModuleFast. DO NOT EDIT THIS LINE. If you do not want this, add -NoProfileUpdate to Install-ModuleFast or add the default destination to your powershell.config.json or to your PSModulePath another way.#>
@ninmonkey I'll have a release soon that should fix this, you can try the instructions in README to test the latest MAIN version and see if it still happens.
@ninmonkey should be fixed, though it may cause a duplicate profile entry now as I think the format changed slightly. If you have your destination in your PSModulePath, already, it should skip the profile add step.
Let me know if not and we can reopen.
At first I thought it your PSModulePath covered this, but then the profile code broke.
Summary
$profile
gives the errorThe term '$env:PSModulePath' is not a command
Get-Module -List -All ugit
does not find it.FastInstall -WhatIf ugit
errors, but I expected that.Resolve-Path: Cannot find path 'C:\Users\cppmo_000\AppData\Local\powershell\Modules' because it does not exist.
After it writes to my profile, and restart wt, the profile code throws this error
Code added to the profile:
which runs as
Before running, I have:
C:\Users\cppmo_000\SkyDrive\Documents\PowerShell\Modules
C:\Users\cppmo_000\AppData\Local\powershell
C:\Users\cppmo_000\AppData\Local\powershell\Modules
Location of Exception