From 1ab0fccff0e2eddb5f5cae37e49deda5afe272ab Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Thu, 22 Aug 2024 17:26:05 -0500 Subject: [PATCH] Adding Brew functionaity. --- src/ExoRepo/Brew.class.st | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ExoRepo/Brew.class.st b/src/ExoRepo/Brew.class.st index bd33b3d..59836bb 100644 --- a/src/ExoRepo/Brew.class.st +++ b/src/ExoRepo/Brew.class.st @@ -15,3 +15,12 @@ Brew class >> install [ shellCommand: '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'; runAndWait) ] + +{ #category : #accessing } +Brew class >> install: packageName [ +Smalltalk os isWindows ifTrue: [ ^ nil ]. + ^ (GtSubprocessWithInMemoryOutput new + shellCommand: 'brew install ', packageName; + runAndWait; + stdout) +]