ide icon indicating copy to clipboard operation
ide copied to clipboard

make lazydocker run without devon wrapper in Windows

Open cinnamon-coder-hub opened this issue 3 years ago • 5 comments

Problem

Currently, while using Windows, if the user wants to run lazydocker installed by devon-ide, the command 'devon lazydocker' has to be executed from inside a devon-ide environment.

Goal

It would be more comfortable for the user to be able to just execute 'lazydocker' from any shell to get lazydocker running.

One approach to solve (for git-bash, cmd and powershell)

Add the lazydocker binary to the path variable via the script 'lazydocker', then the command 'lazydocker' will work inside cmd and powershell. Create an alias inside git-bash linking 'lazydocker' to 'start lazydocker'.

Relations

related to/successor of #738

cinnamon-coder-hub avatar Aug 02 '22 11:08 cinnamon-coder-hub

BTW: I tested lazydocker with release 2022.08.001. When launching it via devon lazydocker it opens in a new powershell window (even from windows terminal). However, when I just run lazydocker (after it is setup and on my PATH) in git-bash (inside windows terminal), lazydocker opens directly in my shell without any issues.

Hence, I do not get, why we need to open lazydocker in a new powershell window when it is launched from our commandlet.

hohwille avatar Sep 12 '22 08:09 hohwille

BTW: I tested lazydocker with release 2022.08.001. When launching it via devon lazydocker it opens in a new powershell window (even from windows terminal). However, when I just run lazydocker (after it is setup and on my PATH) in git-bash (inside windows terminal), lazydocker opens directly in my shell without any issues.

Hence, I do not get, why we need to open lazydocker in a new powershell window when it is launched from our commandlet.

That's very interesting @hohwille. Thanks for the details. I'm kind of happy that I did not start to figure out something else faster, as there seems to be an easy workaround now. When I try out just the command lazydocker inside git-bash, outside of windows terminal, after successful setup and with set PATH, git-bash shows a new empty line and does nothing afterwards. When I run lazydocker with the same setting, but with git-bash from within windows-terminal it works just fine and lazydocker runs inside this git-bash tab within windows-terminal. So I would propose to get rid of this redirection to powershell for running lazydocker, while adding a note inside the documentation that this is a known issue that can easily be avoided by using windows-terminal. Also I could look a bit deeper into this issue to find out what is going wrong there to maybe find a fix without windows-terminal. Alternativley I could easily add an little extra option for users that want to go on with standalone git-bash, so they still have the powershell-workaround for easy usage. I would tackle this after getting your opinion on this and having some spare time. I could try to find some windows-terminal independent solution and go on to the alternative if I don't get a good solution in a reasonable time. So what do you think?

cinnamon-coder-hub avatar Sep 12 '22 14:09 cinnamon-coder-hub

@cinnamon-coder-hub thanks for you feedback. Indeed I was testing in windows-terminal and did not notice the problem. I have tested what you said and can confirm that in plain git-bash lazydocker is not working. Did you try to file a bug directly in lazydocker for this? IMHO it would be the best solution if lazydocker itself could fix the problem. Then maybe we can just leave it as is and if one fine day, lazydocker has fixed it, we can remove our approach to open a new powershell.

hohwille avatar Sep 15 '22 07:09 hohwille

Sounds good, let's do it this way. I'll create an issue on the lazydocker-github page.

cinnamon-coder-hub avatar Oct 10 '22 07:10 cinnamon-coder-hub

Now there is an issue on the lazydocker github-page, regarding the above mentioned git-bash bug.

cinnamon-coder-hub avatar Oct 11 '22 13:10 cinnamon-coder-hub