mirror of https://github.com/mamba-org/mamba.git
commit
913ae26568
|
@ -230,26 +230,7 @@ def do_call(args, parser):
|
||||||
return 0
|
return 0
|
||||||
return exit_code
|
return exit_code
|
||||||
|
|
||||||
|
def _wrapped_main(*args, **kwargs):
|
||||||
# Main entry point!
|
|
||||||
def main(*args, **kwargs):
|
|
||||||
|
|
||||||
print(banner)
|
|
||||||
|
|
||||||
if 'activate' in sys.argv or 'deactivate' in sys.argv:
|
|
||||||
print("Use conda to activate / deactivate the environment.")
|
|
||||||
print('\n $ conda ' + ' '.join(sys.argv[1:]) + '\n')
|
|
||||||
return sys.exit(-1)
|
|
||||||
|
|
||||||
from conda.common.compat import ensure_text_type, init_std_stream_encoding
|
|
||||||
|
|
||||||
init_std_stream_encoding()
|
|
||||||
|
|
||||||
if not args:
|
|
||||||
args = sys.argv
|
|
||||||
|
|
||||||
args = tuple(ensure_text_type(s) for s in args)
|
|
||||||
|
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
args = args + ('-h',)
|
args = args + ('-h',)
|
||||||
|
|
||||||
|
@ -262,4 +243,24 @@ def main(*args, **kwargs):
|
||||||
# from .conda_argparse import do_call
|
# from .conda_argparse import do_call
|
||||||
exit_code = do_call(args, p)
|
exit_code = do_call(args, p)
|
||||||
if isinstance(exit_code, int):
|
if isinstance(exit_code, int):
|
||||||
return exit_code
|
return exit_code
|
||||||
|
|
||||||
|
# Main entry point!
|
||||||
|
def main(*args, **kwargs):
|
||||||
|
from conda.common.compat import ensure_text_type, init_std_stream_encoding
|
||||||
|
init_std_stream_encoding()
|
||||||
|
|
||||||
|
print(banner)
|
||||||
|
|
||||||
|
if 'activate' in sys.argv or 'deactivate' in sys.argv:
|
||||||
|
print("Use conda to activate / deactivate the environment.")
|
||||||
|
print('\n $ conda ' + ' '.join(sys.argv[1:]) + '\n')
|
||||||
|
return sys.exit(-1)
|
||||||
|
|
||||||
|
if not args:
|
||||||
|
args = sys.argv
|
||||||
|
|
||||||
|
args = tuple(ensure_text_type(s) for s in args)
|
||||||
|
|
||||||
|
from conda.exceptions import conda_exception_handler
|
||||||
|
return conda_exception_handler(_wrapped_main, *args, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue