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

Failed to apply theme on Ubuntu WSL #393

Closed
2 tasks done
Descalon opened this issue Feb 10, 2021 · 6 comments
Closed
2 tasks done

Failed to apply theme on Ubuntu WSL #393

Descalon opened this issue Feb 10, 2021 · 6 comments
Labels
🐛 bug Something isn't working

Comments

@Descalon
Copy link
Contributor

Prerequisites

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

Description

Running Set-PoshPrompt -Theme <any theme> results in an error

Environment

  • Oh my Posh version: 3.83.0-beta
  • Theme: any
  • Operating System: Ubuntu 20.04 (WSL)
  • Shell: Powershell
  • Terminal: Windows Terminal

Steps to Reproduce

  1. Install oh-my-posh
  2. run Set-PoshPrompt cmdlet

Expected behavior:
That the theme is applied

Actual behavior:
Error in posh-linux-amd64:

ResourceUnavailable: /home/descalon/.local/share/powershell/Modules/oh-my-posh/3.83.0/oh-my-posh.psm1:69
Line |
  69 |      Invoke-Expression (& $poshCommand --init --shell=pwsh --config="$ …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Program 'posh-linux-amd64' failed to run: No such file or directoryAt
     | /home/descalon/.local/share/powershell/Modules/oh-my-posh/3.83.0/oh-my-posh.psm1:69 char:24 + …
     | ke-Expression (& $poshCommand --init --shell=pwsh --config="$config") +
     | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.

issuereport

@JanDeDobbeleer
Copy link
Owner

@Descalon thx, that's actually a bug 🙏🏻

@JanDeDobbeleer JanDeDobbeleer added the 🐛 bug Something isn't working label Feb 10, 2021
@andrewsav-bt
Copy link

This may be entirely unrelated but when I try the steps above I do not just get the error, I also get a lot of gibberish:

WindowsTerminal_JHi83nukIy

In my case this is not WSL but an ssh session into an Ubuntu 20.04 VM.

@JanDeDobbeleer
Copy link
Owner

No, that's for sure going to be related. I'll check. Maybe the recent change in setting the executable is causing this.

JanDeDobbeleer added a commit that referenced this issue Feb 11, 2021
as this permission is already present, it does not set executable
permissions when needed rsulting is a crashing command

resolves #393
@ielcoro
Copy link

ielcoro commented Feb 18, 2021

This error is still present in version 3.94.4:

ResourceUnavailable: /root/.local/share/powershell/Modules/oh-my-posh/3.94.4/oh-my-posh.psm1:89 Line | 89 | & $poshCommand -config $($_.FullName) -pwd $PWD | ~~~~~~~~~~~ | Program 'posh-linux-amd64' failed to run: No such file or directoryAt | /root/.local/share/powershell/Modules/oh-my-posh/3.94.4/oh-my-posh.psm1:89 char:9 + & $poshCommand | -config $($_.FullName) -pwd $PWD + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.

Environment

  • Oh my Posh version: 3.94.4
  • Theme: any
  • Operating System: Alpine 3.18.2 (Docker WSL Backend 20.10.2 )
  • Shell: Powershell 7 Linux
  • Terminal: Windows Terminal

@JanDeDobbeleer
Copy link
Owner

Probably depends on the WSL OS too based on the way it checks for executable permissions. I'll revert that change altogether.

JanDeDobbeleer added a commit that referenced this issue Feb 18, 2021
the current implementation is too flacky and breaks the module on
certain unix systems

relates to #393
JanDeDobbeleer added a commit that referenced this issue Feb 18, 2021
the current implementation is too flacky and breaks the module on
certain unix systems

relates to #393
@JanDeDobbeleer
Copy link
Owner

@ielcoro can you check again by updating the module and restarting your shell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants