poetry icon indicating copy to clipboard operation
poetry copied to clipboard

fix `poetry shell doesn't work if space character in .venv path`

Open dimstunt opened this issue 2 years ago • 5 comments

fix zsh: poetry shell doesn't work if space character in .venv path

Pull Request Check List

Resolves: #7244

Confirmed working on bash, zsh

dimstunt avatar Dec 23 '22 17:12 dimstunt

Or even simpler: c.sendline(f'emulate bash -c ". {shlex.quote(str(activate_path))}"') (so we get emulate bash -c ". '/some path/activate'")

But the safest one would be: c.sendline(f"emulate bash -c {shlex.quote(f'. {shlex.quote(str(activate_path))}')}") (so we get emulate bash -c '. '"'"'/some path/activate'"'"'')

jaklan avatar Dec 25 '22 20:12 jaklan

Any updates on whether this will get merged in the near future? I am running into the same issue on macOS unfortuantely.

DennisTheMenace780 avatar Jan 22 '23 19:01 DennisTheMenace780

@PabloEmidio when you have a chance, please check this.

dimstunt avatar Jan 31 '23 21:01 dimstunt

@PabloEmidio when you have a chance, please check this.

For what I saw, it should do it. Could any test be added to validate this scenary?

PabloEmidio avatar Feb 01 '23 01:02 PabloEmidio

@PabloEmidio when you have a chance, please check this.

For what I saw, it should do it. Could any test be added to validate this scenary?

Not fast because the executing bash script is moked, and I don't have enough expertise in pytest to change that.

dimstunt avatar Feb 09 '23 13:02 dimstunt

pre-commit.ci autofix

radoering avatar Jan 20 '24 12:01 radoering

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Mar 03 '24 18:03 github-actions[bot]