Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression - Navigate to PowerShell Drive causes theme to not render anymore #112

Closed
2 tasks done
bgelens opened this issue Oct 29, 2020 · 6 comments
Closed
2 tasks done

Comments

@bgelens
Copy link
Contributor

bgelens commented Oct 29, 2020

Prerequisites

  • I have read and understand the CONTRIBUTING guide
  • I looked for duplicate issues before submitting this one

Description

Regression when using a PSDrive. Theme is not rendered anymore.

Before 3.20.4:

image

After 3.23.5:

image

Environment

  • Oh my Posh version: see above
  • Theme: custom
  • Operating System: MacOs
  • Shell: PowerShell 7.1 rc2
  • Terminal: iTerm2

Steps to Reproduce

Navigate to the PowerShell temp drive

cd temp:

Expected behavior: [What you expected to happen]

Normal behavior as before

Actual behavior: [What actually happened]

Theme doesn't render anymore

@JanDeDobbeleer
Copy link
Owner

I know why this happens but I need to find out how to fix this. Basically the new invocation fails because that path only exists in PowerShell and $startInfo.WorkingDirectory is invalid.

@JanDeDobbeleer
Copy link
Owner

The problem is that the fix will probably result in git and other info not working anymore. I'll give this some thought first.

@bgelens
Copy link
Contributor Author

bgelens commented Oct 29, 2020

Maybe?

if ($PWD.Provider.Name -eq "FileSystem") {
  $startInfo.WorkingDirectory = "$($PWD.ProviderPath)"
}

@JanDeDobbeleer
Copy link
Owner

That fixes it. Let's see if I can ship this tomorrow morning as today (as you can see) I'm fried.

@bgelens
Copy link
Contributor Author

bgelens commented Oct 29, 2020

No worries! I've unblocked myself :) Have a good rest! almost weekend 🍺

@JanDeDobbeleer
Copy link
Owner

I think this way the could even be removed. I'll debug on Windows as well to be sure. Thanks a bunch for pairing 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants