Skip to content

Commit f0600de

Browse files
committed
fixes #765
1 parent 246b514 commit f0600de

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

fastcore/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def run_cmd(
5757
try:
5858
ensure(not (disallow_re and re.search(disallow_re, argstr)), 'args disallowed')
5959
ensure(not (allow_re and re.search( allow_re, argstr)), 'args not allowed')
60-
args = [str(Path(a).expanduser()) if a.startswith('~') else a for a in split(argstr)]
60+
args = [str(Path(a).expanduser()) if a.startswith('~') else a for a in split(argstr, posix=False)]
6161
outp = run([cmd] + args, text=True, stdin=DEVNULL, capture_output=True)
6262
except: return explain_exc(f'running cmd')
6363
res = outp.stdout

nbs/12_tools.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
" try:\n",
229229
" ensure(not (disallow_re and re.search(disallow_re, argstr)), 'args disallowed')\n",
230230
" ensure(not (allow_re and re.search( allow_re, argstr)), 'args not allowed')\n",
231-
" args = [str(Path(a).expanduser()) if a.startswith('~') else a for a in split(argstr)]\n",
231+
" args = [str(Path(a).expanduser()) if a.startswith('~') else a for a in split(argstr, posix=False)]\n",
232232
" outp = run([cmd] + args, text=True, stdin=DEVNULL, capture_output=True)\n",
233233
" except: return explain_exc(f'running cmd')\n",
234234
" res = outp.stdout\n",

0 commit comments

Comments
 (0)