Comments (11)
I was able to repro this on my machine as well. Not sure what could be causing this but I'll file a bug for this on the WSL team and investigate!
@craigloewen-msft what is the issue number for the bug you filed? I can't see it on WSL github. Maybe it's fixed in the latest preview?
I filed an issue for this on our internal tracking
from powershell-wsl-interop.
Awesome. I just published 0.3.0 of the WslInterop package with the changes.
I'm going to close this as the remaining bug is in WSL 2 and @craigloewen-msft is tracking that separately.
from powershell-wsl-interop.
Thanks for reporting. I can repro on my machine as well. Actually just running dir | wsl less
is also broken, so it appears to be some regression with WSL 2 and nothing specific to this module.
@craigloewen-msft any ideas what could be going on here?
from powershell-wsl-interop.
I was able to repro this on my machine as well. Not sure what could be causing this but I'll file a bug for this on the WSL team and investigate!
from powershell-wsl-interop.
@mikebattista - for this issue, I have set up WSL so that the default distro runs v1 and another distro runs v2. v2 works better with an xserver that I use to run Linux GUI apps. (I saw today that WSL is going to officially support Linux GUI apps :))
Ideally, I'd like the default to be v2 (so that I can just type wsl
). Is there a way to tell wslinterop
to use a specific distro - something like wsl -d <distro>
?
from powershell-wsl-interop.
Not right now, but it could be easy to add. Now it relies on the default WSL distro (set by wsl -s
) which in your case sounds like it would be the v1 distro, and you don't want to change that. Is that correct? Or would you be willing to change your default to the v2 distro via wsl -s
? The benefit of that would be that any explicit wsl
calls you make that don't go through WslInterop would also use the v2 distro without having to specify it.
If you're not willing to change your default WSL distro via wsl -s
, when using wsl
directly to pass through commands, if you add -d <nondefaultdistro>
before the command to pass through (e.g. wsl -d <nondefaultdistro> ls
), does that successfully invoke the command in the <nondefaultdistro>
?
If so, I could add support like $WslDefaultParameterValues["-d"] = "<nondefaultdistro>"
which would then get passed through to the wsl
command via -d
. So you could add that to your profile and all WslInterop calls will go through the v2 distro even if your default distro set in wsl
is the v1 distro.
from powershell-wsl-interop.
Yes, please add a -d
option.
I'd like to change my default WSL distro to v2, which currently doesn't work because of this issue. The new option will let me point WslInterop to a (non-default) v1 distro until the WSL team fix the WSL2 regression. Thanks
from powershell-wsl-interop.
I was able to repro this on my machine as well. Not sure what could be causing this but I'll file a bug for this on the WSL team and investigate!
@craigloewen-msft what is the issue number for the bug you filed? I can't see it on WSL github. Maybe it's fixed in the latest preview?
from powershell-wsl-interop.
Yes, please add a
-d
option.I'd like to change my default WSL distro to v2, which currently doesn't work because of this issue. The new option will let me point WslInterop to a (non-default) v1 distro until the WSL team fix the WSL2 regression. Thanks
Could you try the changes at https://github.com/mikebattista/PowerShell-WSL-Interop/blob/wsl-d-parameter/WslInterop.psm1?
Just replace the .psm1 file on your system with the one from that branch, start a new PS session, then set $WslDefaultParameterValues["-d"] = "<distro>"
.
from powershell-wsl-interop.
Just replace the .psm1 file on your system with the one from that branch, start a new PS session, then set
$WslDefaultParameterValues["-d"] = "<distro>"
.
Thank you very much for the quick change. That works perfectly!
from powershell-wsl-interop.
from powershell-wsl-interop.
Related Issues (20)
- Error loading profile HOT 6
- Wsl Default Paramter Error HOT 15
- Completion not working for default shells other than bash HOT 26
- PowerShell passes trimmed command to bash completion. HOT 7
- \\wsl$\<distro_name>\<path> UNC path syntax is not converted HOT 3
- Cannot run npm/nvm HOT 16
- Bash Completion for python based commands (Ansible) HOT 8
- Make WslDefaultParameterValues dynamic not static HOT 3
- Argument completion only works for the first command in a pipeline
- wsl.exe ls is super slow (is this due to vmIdleTimeout=60 seconds) HOT 1
- -exec Parameter for "find" does not work properly HOT 2
- Command execution broken in Powershell 7.3.0 HOT 6
- `zsh:1: permission denied:` HOT 6
- Is there a way to export aliases from WSL2, so I can use them in PowerShell? HOT 2
- Feature Request: Ability to define bash functions that can be used either in the shell or PowerShell profile. HOT 1
- Awk not working correctly HOT 5
- Install-Module WslInterop makes profile loading very slow HOT 1
- Importing WSL Bash aliases to Powershell
- Imported commands fail with path translation failures and mount failure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powershell-wsl-interop.