mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
switched to argv[0] from __file__ as it is what we actually wanted
This commit is contained in:
parent
5aec5e5eb0
commit
fdeca37257
2 changed files with 4 additions and 2 deletions
|
@ -44,7 +44,7 @@ if __name__ == '__main__':
|
|||
|
||||
cli = None
|
||||
display = Display()
|
||||
me = os.path.basename(__file__)
|
||||
me = os.path.basename(sys.argv[0])
|
||||
|
||||
try:
|
||||
if me == 'ansible-playbook':
|
||||
|
|
|
@ -131,7 +131,7 @@ class PullCLI(CLI):
|
|||
if path is None:
|
||||
raise AnsibleOptionsError(("module '%s' not found.\n" % self.options.module_name))
|
||||
|
||||
bin_path = os.path.dirname(os.path.abspath(__file__))
|
||||
bin_path = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||
cmd = '%s/ansible localhost -i "%s" %s -m %s -a "%s"' % (
|
||||
bin_path, inv_opts, base_opts, self.options.module_name, repo_opts
|
||||
)
|
||||
|
@ -144,6 +144,8 @@ class PullCLI(CLI):
|
|||
self.display.display("Sleeping for %d seconds..." % self.options.sleep)
|
||||
time.sleep(self.options.sleep);
|
||||
|
||||
import q
|
||||
q(cmd)
|
||||
# RUN the Checkout command
|
||||
rc, out, err = run_cmd(cmd, live=True)
|
||||
|
||||
|
|
Loading…
Reference in a new issue