commands: use a list to replace sys.argv in runscript (#38261)
This commit is contained in:
parent
dc55cfa090
commit
7e3a7a629c
|
@ -30,5 +30,5 @@ class Command(BaseCommand):
|
|||
fullpath = os.path.dirname(os.path.abspath(args[0]))
|
||||
sys.path.insert(0, fullpath)
|
||||
module_name = os.path.splitext(os.path.basename(args[0]))[0]
|
||||
sys.argv = args
|
||||
sys.argv = list(args)
|
||||
runpy.run_module(module_name)
|
||||
|
|
Loading…
Reference in New Issue