mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Remove unneeded "-a" from the RPM query for performance improvement (#3077)
Signed-off-by: Julian C. Dunn <jdunn@chef.io>
This commit is contained in:
parent
c244ce6319
commit
1046a77027
3 changed files with 4 additions and 4 deletions
|
@ -181,7 +181,7 @@ module Inspec::Resources
|
|||
|
||||
def rpm_command(package_name)
|
||||
cmd = ''
|
||||
cmd += 'rpm -qia'
|
||||
cmd += 'rpm -qi'
|
||||
cmd += " --dbpath #{@dbpath}" if @dbpath
|
||||
cmd += ' ' + package_name
|
||||
|
||||
|
|
|
@ -240,9 +240,9 @@ class MockLoader
|
|||
'yum -v repolist all' => cmd.call('yum-repolist-all'),
|
||||
'dpkg -s curl' => cmd.call('dpkg-s-curl'),
|
||||
'dpkg -s held-package' => cmd.call('dpkg-s-held-package'),
|
||||
'rpm -qia curl' => cmd.call('rpm-qia-curl'),
|
||||
'rpm -qia --dbpath /var/lib/fake_rpmdb curl' => cmd.call('rpm-qia-curl'),
|
||||
'rpm -qia --dbpath /var/lib/rpmdb_does_not_exist curl' => cmd_exit_1.call,
|
||||
'rpm -qi curl' => cmd.call('rpm-qi-curl'),
|
||||
'rpm -qi --dbpath /var/lib/fake_rpmdb curl' => cmd.call('rpm-qi-curl'),
|
||||
'rpm -qi --dbpath /var/lib/rpmdb_does_not_exist curl' => cmd_exit_1.call,
|
||||
'pacman -Qi curl' => cmd.call('pacman-qi-curl'),
|
||||
'brew info --json=v1 curl' => cmd.call('brew-info--json-v1-curl'),
|
||||
'brew info --json=v1 nginx' => cmd.call('brew-info--json-v1-nginx'),
|
||||
|
|
Loading…
Reference in a new issue