Skip to content

Commit

Permalink
Merge pull request #12140 from alanmcanonical/fix_bash_pkg_installed
Browse files Browse the repository at this point in the history
Fix bash_package_installed macro
  • Loading branch information
jan-cerny authored Jul 10, 2024
2 parents 46555a6 + f252f24 commit 3c275a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/macros/10-bash.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ done
#}}
{{%- macro bash_package_installed(pkgname) -%}}
{{%- if pkg_manager == "apt_get" -%}}
dpkg-query --show --showformat='${db:Status-Status}\n' "{{{ pkgname }}}" 2>/dev/null | grep -q installed
dpkg-query --show --showformat='${db:Status-Status}\n' "{{{ pkgname }}}" 2>/dev/null | grep -q ^installed
{{%- else -%}}
rpm --quiet -q "{{{ pkgname }}}"
{{%- endif -%}}
Expand Down

0 comments on commit 3c275a1

Please sign in to comment.