Skip to content

Commit e8ca4e1

Browse files
committed
switch to use subprocess.check_output instead of subprocess.run
1 parent cd70206 commit e8ca4e1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plugins/modules/packaging/os/homebrew_cask.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,10 @@ def _get_brew_version(self):
484484

485485
cmd = [self.brew_path, '--version']
486486

487-
process = subprocess.run(cmd, stdout=subprocess.PIPE)
488-
489-
process_output = process.stdout.decode()
487+
process_output = subprocess.check_output(cmd)
490488

491489
# get version string from first line of "brew --version" output
492-
version = process_output.split('\n')[0].split(' ')[1]
490+
version = process_output.decode('utf-8').split('\n')[0].split(' ')[1]
493491

494492
self.brew_version = version
495493

0 commit comments

Comments
 (0)