Skip to content
Myr

Correctly chop off the first arg on windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 6e33882 · Browse files · 2 files+3 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−7 removed

  • other:+3 added−7 removed

2 files+3 added−7 removed

modified:click/_winconsole.py+2 added-5 removed
230 unmodified lines
231 arg = argv[0]232 if not arg.startswith('-') or arg == '-':233 break234 argv = argv[1:]235 if arg == '-m':235 if arg in ('-c', '-m'):236 break237 if arg == '-c':238 argv[0] = u'-c'239 break237241 return argv238 return argv[1:]239240241_stream_factories = {242 0: _get_text_stdin,
22 unmodified lines
modified:click/core.py+1 added-2 removed
11 unmodified lines
12from .formatting import HelpFormatter, join_options13from .parser import OptionParser, split_opt14from .globals import push_context, pop_context1516from ._compat import PY2, isidentifier, iteritems16from ._compat import PY2, isidentifier, iteritems, get_os_args17from ._unicodefun import _check_for_unicode_literals, _verify_python3_env181920_missing = object()
1690 unmodified lines
171117121713# Circular dependency between decorators and core1714from .decorators import command, group1715from .utils import get_os_args