feat: Update macOS brew list command for casks

This commit is contained in:
Carlos Álvaro 2020-09-04 16:10:51 +02:00 committed by Pedro Algarvio
parent 4291e76bf1
commit 3aab8a73e3
2 changed files with 2 additions and 4 deletions

View file

@ -174,7 +174,7 @@ def list_pkgs(versions_as_list=False, **kwargs):
# Grab packages from brew cask, if available.
# Brew Cask doesn't provide a JSON interface, must be parsed the old way.
try:
cask_cmd = "cask list --versions"
cask_cmd = "list --cask --versions"
out = _call_brew(cask_cmd)["stdout"]
for line in out.splitlines():

View file

@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
"""
:codeauthor: Nicole Thomas <nicole@saltstack.com>
"""
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Libs
import salt.modules.mac_brew_pkg as mac_brew
@ -141,7 +139,7 @@ class BrewTestCase(TestCase, LoaderModuleMockMixin):
"stderr": "",
"retcode": 0,
}
elif cmd == "cask list --versions":
elif cmd == "list --cask --versions":
result = {
"stdout": "macvim 8.1.151\nfont-firacode-nerd-font 2.0.0",
"stderr": "",