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

Pipenv Shell raises error if shell's path contains space #2115

Closed
gtalarico opened this issue May 1, 2018 · 2 comments · Fixed by #2168
Closed

Pipenv Shell raises error if shell's path contains space #2115

gtalarico opened this issue May 1, 2018 · 2 comments · Fixed by #2168
Labels
Type: Bug 🐛 This issue is a bug.

Comments

@gtalarico
Copy link
Contributor

gtalarico commented May 1, 2018

This might be a windows only issue - Pipenv version 11.10.1
I am using cmder console

Steps to replicate
  1. `set PIPENV_SHELL="c:\path_with space\enclosed\inquotes\shell"
  2. pipenv shell
Expected result

Pipenv Shell is activated with the desired shell

Actual result

Pipenv Shell is activated with the default shell (cmd.exe)

'c:\path_with' is not regognized as an internal or external command

I use a portable cmder that is in a folder location that has spaces in its path.
To use Pipenv with cmder, I need to set PIPENV_SHELL to cmder's init.bat file
This files if there is a space in the folder path.

Work Around

Moving cmder's init.bat to a location with no spaces fixes it

image

@uranusjr
Copy link
Member

uranusjr commented May 2, 2018

Probably needs to quote it here. https://github.com/pypa/pipenv/blob/master/pipenv/core.py#L2179

@techalchemy techalchemy added the Type: Bug 🐛 This issue is a bug. label May 2, 2018
@uranusjr
Copy link
Member

uranusjr commented May 2, 2018

I don’t think the above quote works. Didn’t actually check, but it seems on Windows it should go through the pew workon code path. I need to write a few unit tests to get this right…

uranusjr added a commit that referenced this issue May 2, 2018
This should resolve a lot of the misquoting bugs.

Two places not fixed AFAIK:

* The pip call in `core.pip_install`. Too convoluted; I don't dare
  rewriting it.
* The strange pexpect cmd mentioned in #2115, and pew's inve method.
uranusjr added a commit that referenced this issue May 2, 2018
This should resolve a lot of the misquoting bugs.

Two places not fixed AFAIK:

* The pip call in `core.pip_install`. Too convoluted; I don't dare
  rewriting it.
* The strange pexpect cmd mentioned in #2115, and pew's inve method.
kennethreitz added a commit that referenced this issue May 23, 2018
…pe-fix

Escpace spaces on cmder shell path - Fixes #2115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants