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

Bugfixes & Expanded Environment Support #11

Merged
merged 7 commits into from
Jun 26, 2022
Merged

Conversation

frecks
Copy link
Contributor

@frecks frecks commented Apr 5, 2022

Hi @chvolkmann. Your code-connect utility has been incredibly useful! Thanks for taking the time to put this together. Here are a few updates that I hope you will find valuable. Please let me know if you need anything changed or have any questions.

A change in the March 2022 (version
1.66)
release of VS Code broke an assumption code-connect was making about the location of the code binary. This pull request fixes that issue.

This pull request also expands code-connect's supported environments to include CentOS Stream 8 machines running GNU which v2.21 and Python 3.5 or newer.

Finally, I've fixed a small formatting bug with an if statement in code.fish & I've updated the README/CHANGELOG/VERSION documents to note these changes.

frecks added 7 commits April 4, 2022 14:55
This commit removes the python style colon line termination on the if
statement. The colon was causing undesired behavior when executing this
function in the fish shell. Reference the fish shell docs
[example](https://fishshell.com/docs/current/cmds/if.html#example) of an
`if` statement for proper syntax.
The GNU which v2.21 command found on CentOS Stream 8 behaves differently
than the which command on Debian based systems such as Ubuntu 20.04. The
GNU which command prints to stderr when the command is not found. This
can cause an error message to be erroneously printed during our test for
a locally installed VS Code binary. Redirecting stderr to /dev/null
silences this error message so our code produces the same behavior for
either version of the which command.
The binary location changed from `~/.vscode-server/bin/<commit-id>/bin/code` to
`~/.vscode-server/bin/<commit-id>/bin/remote-cli/code` in [commit
f4ba7dd12b684b144457c6fc6ccc9f4fe71bde3c](microsoft/vscode@f4ba7dd),
which was released in [March 2022 (version
1.66)](https://github.com/microsoft/vscode/releases/tag/1.66.0).
The `capture_output` parameter was added to `subprocess.run()` in Python
3.7. Directing stdout & stderr to `subprocess.PIPE` accomplishes the
same goal & is supported from Python 3.5.
Update documentation of supported/tested Python versions.
Update documentation of `code` executable location.
@frecks
Copy link
Contributor Author

frecks commented Apr 5, 2022

I submitted this PR to your dev branch because it is marked as default, but I just noticed that the curl command in /conf.d/code-connect.fish points to the main branch. I imagine we will want to either merge this into the main branch or update the url in /conf.d/code-connect.fish.

@chvolkmann
Copy link
Owner

Hey @frecks , thanks for your pull request! Your update is much appreciated and will be merged.

@chvolkmann chvolkmann merged commit b232e05 into chvolkmann:dev Jun 26, 2022
@frecks
Copy link
Contributor Author

frecks commented Jun 26, 2022

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants