Skip to content

Don't make gp rely on PATH to look up code #3844

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

Closed
pattacini opened this issue Apr 8, 2021 · 7 comments
Closed

Don't make gp rely on PATH to look up code #3844

pattacini opened this issue Apr 8, 2021 · 7 comments
Labels

Comments

@pattacini
Copy link
Contributor

pattacini commented Apr 8, 2021

This request originates from a community post, where I described my use case foreseeing the possibility to launch a purposely installed version of code within a VNC desktop as in the screenshot below.

abac653b7ac361ccd0cd125ec35bcd759675d442

The point is that to this end I had to shadow in the PATH the version of code installed by the Gitpod layer. The latter causes headaches when the VS Code UI is selected in Gitpod: for example, gp open <filename> clearly no longer works.

@akosyakov suggested that this could be solved by preventing gp from relying on PATH to look up code.

@akosyakov akosyakov added editor: code (browser) type: bug Something isn't working labels Apr 8, 2021
@akosyakov akosyakov added this to the [backlog] April 2021 milestone Apr 8, 2021
@akosyakov
Copy link
Member

Here

ENV GITPOD_ENV_SET_EDITOR code
ENV GITPOD_ENV_SET_VISUAL "$GITPOD_ENV_SET_EDITOR"
ENV GITPOD_ENV_SET_GP_OPEN_EDITOR "$GITPOD_ENV_SET_EDITOR"
ENV GITPOD_ENV_SET_GIT_EDITOR "$GITPOD_ENV_SET_EDITOR --wait"
ENV GITPOD_ENV_SET_GP_PREVIEW_BROWSER "code --command gitpod.api.preview"
ENV GITPOD_ENV_SET_GP_EXTERNAL_BROWSER "code --open-external"
we should replace code with /ide/bin/code. PRs are welcomed!

@pattacini
Copy link
Contributor Author

PR opened in #3846.

@akosyakov
Copy link
Member

fixed by #3846 we are going to deploy it tomorrow morning

@pattacini
Copy link
Contributor Author

Hi @akosyakov

I'm still getting /ide/bin/code as the output of which code on a fresh workspace, meaning that it's still in the PATH.

Do I need to wait longer for the deployment?

@akosyakov
Copy link
Member

We did not fix shadowing of code, only you can do it, but gp open should delegate to Gitpod Code CLI. Does gp open work for you?

@pattacini
Copy link
Contributor Author

Ok then! Let me try: I have to generate my docker images again.

@pattacini
Copy link
Contributor Author

It works like a charm 👍🏻
Thanks again!

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

No branches or pull requests

2 participants