mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-06 22:32:54 +02:00
fix issue with globs not including filenames with spaces with magic syntax (introduced during switch to use subprocess to grab process exit code). No longer need to shlex quote arguments.
This commit is contained in:
@ -6,7 +6,6 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
import shlex
|
|
||||||
import importlib
|
import importlib
|
||||||
import textwrap
|
import textwrap
|
||||||
import signal
|
import signal
|
||||||
@ -415,8 +414,7 @@ def magic_parser(args):
|
|||||||
if len(args) <= 1 or args[1].startswith('--'):
|
if len(args) <= 1 or args[1].startswith('--'):
|
||||||
return False, None, None, []
|
return False, None, None, []
|
||||||
|
|
||||||
# correctly parse escape characters and spaces with shlex
|
args_given = args[1:]
|
||||||
args_given = ' '.join(map(shlex.quote, args[1:])).split()
|
|
||||||
options = []
|
options = []
|
||||||
|
|
||||||
# find the options
|
# find the options
|
||||||
|
Reference in New Issue
Block a user