Skip to content

Fixed pyenv version syntax#313

Merged
anthonykim1 merged 2 commits into
microsoft:mainfrom
0xJonas:fix_pyenv_invokation_in_dev_container
Dec 13, 2023
Merged

Fixed pyenv version syntax#313
anthonykim1 merged 2 commits into
microsoft:mainfrom
0xJonas:fix_pyenv_invokation_in_dev_container

Conversation

@0xJonas
Copy link
Copy Markdown
Contributor

@0xJonas 0xJonas commented Dec 2, 2023

The :latest syntax used in the pyenv invokation in onCreateCommand.sh does not appear to exist. Because of this, the devcontainer fails to build. The fix is to specify the Python versions without patch versions, which makes pyenv automatically use the latest version.

Snippet from the log for the previously failing build:

pyenv: version `latest' not installed
pyenv: python3.8: command not found

The `python3.8' command exists in these Python versions:
  3.8.18

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.
scripts/onCreateCommand.sh: line 27: /workspaces/lsprotocol/.venv/bin/activate: No such file or directory
[1268491 ms] onCreateCommand failed with exit code 1. Skipping any further user-provided commands.

@0xJonas 0xJonas force-pushed the fix_pyenv_invokation_in_dev_container branch from 48a10da to af18fe2 Compare December 2, 2023 14:57
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Dec 12, 2023
@karthiknadig karthiknadig self-assigned this Dec 12, 2023
@karthiknadig
Copy link
Copy Markdown
Member

It looks like ruff updated formatting rules. Would it be possible for you to run ruff format . with the latest version of Ruff

@anthonykim1
Copy link
Copy Markdown
Contributor

anthonykim1 commented Dec 12, 2023

Screenshot 2023-12-11 at 8 06 08 PM Screenshot 2023-12-11 at 8 09 59 PM

Interesting.. I am testing the build of new codespaces container myself just right now, but was able to get through all versions including 3.8 but still ended up with failed build. Perhaps there was some update from pyenv getting rid of :latest

@0xJonas
Copy link
Copy Markdown
Contributor Author

0xJonas commented Dec 12, 2023

Did the reformatting, it added one comma :)

@anthonykim1 anthonykim1 requested review from karthiknadig and removed request for karthiknadig December 13, 2023 00:06
@anthonykim1 anthonykim1 merged commit 4a296ec into microsoft:main Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants