Skip to content

Commit

Permalink
Merge pull request #2168 from gtalarico/windows-cmder-root-space-esca…
Browse files Browse the repository at this point in the history
…pe-fix

Escpace spaces on cmder shell path - Fixes #2115
  • Loading branch information
kennethreitz committed May 23, 2018
2 parents e74db18 + 65fbad2 commit 220d0c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipenv/patched/pew/pew.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ def fork_bash(env, cwd):

def fork_cmder(env, cwd):
shell_cmd = ['cmd']
cmderrc_path = r'%CMDER_ROOT%\vendor\init.bat'
escaped_cmder_root = os.environ['CMDER_ROOT'].replace(' ', '^ ')
cmderrc_path = r'{0}\vendor\init.bat'.format(escaped_cmder_root)
if expandpath(cmderrc_path).exists():
shell_cmd += ['/k', cmderrc_path]
if cwd:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/pipenv/patched/pew/pew.py b/pipenv/patched/pew/pew.py
index 2d3889a0..91f313c1 100644
--- a/pipenv/patched/pew/pew.py
+++ b/pipenv/patched/pew/pew.py
@@ -184,7 +184,8 @@ def fork_bash(env, cwd):

def fork_cmder(env, cwd):
shell_cmd = ['cmd']
- cmderrc_path = r'%CMDER_ROOT%\vendor\init.bat'
+ escaped_cmder_root = os.environ['CMDER_ROOT'].replace(' ', '^ ')
+ cmderrc_path = r'{0}\vendor\init.bat'.format(escaped_cmder_root)
if expandpath(cmderrc_path).exists():
shell_cmd += ['/k', cmderrc_path]
if cwd:

0 comments on commit 220d0c9

Please sign in to comment.