[go: nahoru, domu]

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

Fix pyenv.ps1 since fail to invoke binary right if home path contain parenthesis or space #623

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wasdee
Copy link
@wasdee wasdee commented May 24, 2024

The issue

#618 fix installation, but invoke it still fail. also related to #616

PS C:\Users\Nutchanon(Ben)> pyenv --version
\.pyenv\pyenv-win\libexec\pyenv---version.bat"" was unexpected at this time.

PS C:\Users\Nutchanon(Ben)> pyenv update
\.pyenv\pyenv-win\libexec\pyenv-update.bat"" was unexpected at this time.

However, direct call seems fine

PS C:\Users\Nutchanon(Ben)> & "C:\Users\Nutchanon(Ben)\.pyenv\pyenv-win\libexec\pyenv---version.bat"
pyenv 3.1.1

The Investigation and Fix

I found that the cause is from pyenv.bat in the plugin session.

bin\pyenv.ps1 -> bin\pyenv.bat -> libexec\pyenv*

I moved up the EnableDelayedExpansion and rewrite path concatinations.

The Notes

This is a work on top of #618 please merge that PR first.

@wasdee wasdee marked this pull request as ready for review May 24, 2024 11:04
@wasdee wasdee requested a review from a team as a code owner May 24, 2024 11:04
@wasdee wasdee changed the title Fix pyenv.ps1 script fail to invoke binary if path contain () Fix pyenv.ps1 script fail to invoke binary if path contain parenthesis or space May 24, 2024
@wasdee wasdee changed the title Fix pyenv.ps1 script fail to invoke binary if path contain parenthesis or space Fix pyenv.ps1 since fail to invoke binary right if home path contain parenthesis or space May 24, 2024
@Darsstar
Copy link
Collaborator

Is it actually working for you?

I altered lines 32 and 37 of tests/conftest.py so those end with (with spaces).

Because when I run the unit tests locally 38 fail.
If I move the setlocal enabledelayedexpansion to right after :plugin only 20 fail.

Those remaining 20 seem to be because bin/WiX/dark.exe can't handle parentheses

@wasdee
Copy link
Author
wasdee commented May 27, 2024

Okay let me check and I will get back to you

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.

None yet

3 participants