mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 04:49:09 -07:00
[PR #7970/9510988a backport][stable-7] cargo: use the correct path when checking installation status fixing idempotency issue. (#8018)
cargo: use the correct path when checking installation status fixing idempotency issue. (#7970)
* cargo: use the correct path when checking installation status
* Add changelog fragment
* Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9510988abc
)
Co-authored-by: rbomze <14312790+rbomze@users.noreply.github.com>
This commit is contained in:
parent
533df42e6f
commit
8bfd8bfb09
2 changed files with 14 additions and 0 deletions
|
@ -137,6 +137,10 @@ class Cargo(object):
|
|||
|
||||
def get_installed(self):
|
||||
cmd = ["install", "--list"]
|
||||
if self.path:
|
||||
cmd.append("--root")
|
||||
cmd.append(self.path)
|
||||
|
||||
data, dummy = self._exec(cmd, True, False, False)
|
||||
|
||||
package_regex = re.compile(r"^([\w\-]+) v(.+):$")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue