Skip to content

Symlinks made by WinGet break when Windows Terminal is launched through PowerToys Run #31739

Open
@getchoo

Description

Microsoft PowerToys version

0.79.0

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

PowerToys Run

Steps to reproduce

  • Install package that WinGet creates links for (fnm is an example)
  • Use PowerToys Run to launch Windows Terminal
  • Attempt to use CLI command

✔️ Expected Behavior

The links WinGet creates will be usable whenever using them in Windows Terminal/Powershell

❌ Actual Behavior

After Windows Terminal is launched with PowerToys Run:

Powershell produces the following error when running the exe directly

ResourceUnavailable: Program 'fnm.exe' failed to run: An error occurred trying to start process 'C:\Users\setha\AppData\Local\Microsoft\WinGet\Links\fnm.exe' with working directory 'C:\Users\setha'. No application is associated with the specified file for this operation.At line:1 char:1
+ fnm --help
+ ~~~~~~~~~~.

The error from the command that's run in my $PROFILE seems to provide a bit more insight into what's going on here

ResourceUnavailable: C:\Users\setha\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:1
Line |
   1 |  fnm env --use-on-cd | Out-String | Invoke-Expression
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Program 'fnm.exe' failed to run: An error occurred trying to start process
     | 'C:\Users\setha\AppData\Local\Microsoft\WinGet\Links\fnm.exe' with working directory 'C:\Users\setha'. The path
     | cannot be traversed because it contains an untrusted mount point.At
     | C:\Users\setha\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:1 char:1 + fnm env --use-on-cd | Out-String
     | | Invoke-Expression + ~~~~~~~~~~~~~~~~~~~.

This does not happen when launching Windows Terminal directly or when using the Win+X menu

Other Software

WinGet v1.7.10582
Powershell v7.4.1
Windows Terminal v1.19.10573.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-App CompatIssues revolving around application compatibility across PowerToysIssue-BugSomething isn't workingNeeds-TriageFor issues raised to be triaged and prioritized by internal Microsoft teamsProduct-PowerToys RunImproved app launch PT Run (Win+R) Window

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions