mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-04 21:24:24 -07:00
bzr: command args as list rather than string (#10523)
* bzr: command args as list rather than string * add changelog frag
This commit is contained in:
parent
2a4222c0f6
commit
a96684ef40
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/10523-bzr-cmd-list.yml
Normal file
2
changelogs/fragments/10523-bzr-cmd-list.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- bzr - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10523).
|
|
@ -80,7 +80,7 @@ class Bzr(object):
|
|||
def get_version(self):
|
||||
'''samples the version of the bzr branch'''
|
||||
|
||||
cmd = "%s revno" % self.bzr_path
|
||||
cmd = [self.bzr_path, "revno"]
|
||||
rc, stdout, stderr = self.module.run_command(cmd, cwd=self.dest)
|
||||
revno = stdout.strip()
|
||||
return revno
|
||||
|
@ -100,7 +100,7 @@ class Bzr(object):
|
|||
|
||||
def has_local_mods(self):
|
||||
|
||||
cmd = "%s status -S" % self.bzr_path
|
||||
cmd = [self.bzr_path, "status", "-S"]
|
||||
rc, stdout, stderr = self.module.run_command(cmd, cwd=self.dest)
|
||||
lines = stdout.splitlines()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue