PSCore fails to load profile if startingDirectory points to other drive #3004

Closed
opened 2026-01-30 23:10:40 +00:00 by claunia · 4 comments
Owner

Originally created by @davidkwoods on GitHub (Jul 30, 2019).

Environment

Windows build number: 10.0.18362.239
Windows Terminal version (if applicable): 0.2.1831.0

Any other software?
No

Steps to reproduce

Set startingDirectory for the PSCore profile to a directory not on the C: drive. In my example, the D: drive.

Expected behavior

PSCore should still load its profile from C:\Users\<user>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

Actual behavior

PSCore attempts to load its profile from \Users\<user>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 and fails because it tries to find it on the D: drive, which doesn't contain that file.

The same steps do not repro for classic PowerShell. It loads its profile correctly when set to start on a different drive.

Originally created by @davidkwoods on GitHub (Jul 30, 2019). # Environment ```none Windows build number: 10.0.18362.239 Windows Terminal version (if applicable): 0.2.1831.0 Any other software? No ``` # Steps to reproduce Set startingDirectory for the PSCore profile to a directory not on the C: drive. In my example, the D: drive. # Expected behavior PSCore should still load its profile from `C:\Users\<user>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1` # Actual behavior PSCore attempts to load its profile from `\Users\<user>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1` and fails because it tries to find it on the D: drive, which doesn't contain that file. The same steps do not repro for classic PowerShell. It loads its profile correctly when set to start on a different drive.
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 30, 2019):

This is highly irregular. What version of PSCore?
This should also reproduce if you run pwsh from a standard console host by starting it from CMD. Windows Terminal doesn’t change how an application starts up, after all.

C:\>D:
D:\>pwsh
@DHowett-MSFT commented on GitHub (Jul 30, 2019): This is highly irregular. What version of PSCore? This should also reproduce if you run `pwsh` from a standard console host by starting it from CMD. Windows Terminal doesn’t change how an application starts up, after all. ``` C:\>D: D:\>pwsh ```
Author
Owner

@zadjii-msft commented on GitHub (Aug 5, 2019):

@Björn Did you delete your comment for some reason? If you can confirm this is happening in other terminals, not just the Windows Terminal, then we should definitely just close this issue in favor of tracking an issue on the powershell repo

From: Björn Petersen notifications@github.com
Sent: Sunday, August 4, 2019 3:07 AM
To: microsoft/terminal terminal@noreply.github.com
Cc: Subscribed subscribed@noreply.github.com
Subject: Re: [microsoft/terminal] PSCore fails to load profile if startingDirectory points to other drive (#2154)

I'm having the same problem with PSCore, but it's not related to the new terminal for me. It also happens in the old terminal and integrated in IDEs like IntelliJ.

@zadjii-msft commented on GitHub (Aug 5, 2019): @Björn Did you delete your comment for some reason? If you can confirm this is happening in other terminals, not _just_ the Windows Terminal, then we should definitely just close this issue in favor of tracking an issue on the powershell repo From: Björn Petersen <notifications@github.com> Sent: Sunday, August 4, 2019 3:07 AM To: microsoft/terminal <terminal@noreply.github.com> Cc: Subscribed <subscribed@noreply.github.com> Subject: Re: [microsoft/terminal] PSCore fails to load profile if startingDirectory points to other drive (#2154) I'm having the same problem with PSCore, but it's not related to the new terminal for me. It also happens in the old terminal and integrated in IDEs like IntelliJ.
Author
Owner

@BjoernPetersen commented on GitHub (Aug 5, 2019):

I re-read the issue and realized my problem is not related.

@BjoernPetersen commented on GitHub (Aug 5, 2019): I re-read the issue and realized my problem is not related.
Author
Owner

@ghost commented on GitHub (Aug 10, 2019):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Aug 10, 2019): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3004