runscript: makes sure script path is searched first
This commit is contained in:
parent
d186543c6c
commit
26d3c95173
|
@ -39,7 +39,7 @@ class CmdRunScript(Command):
|
|||
publisher.app_dir = os.path.join(publisher.app_dir, sub_options.vhost)
|
||||
publisher.set_config()
|
||||
fullpath = os.path.dirname(os.path.abspath(args[0]))
|
||||
sys.path.append(fullpath)
|
||||
sys.path.insert(0, fullpath)
|
||||
module_name = os.path.splitext(os.path.basename(args[0]))[0]
|
||||
sys.argv = args
|
||||
runpy.run_module(module_name)
|
||||
|
|
Loading…
Reference in New Issue