Skip to content

Commit 04f7cb8

Browse files
committed
feat: enable macOS
1 parent 549e281 commit 04f7cb8

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/resources/aws-cli/cli/aws-cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ softwareupdate --install-rosetta
104104
return;
105105
}
106106

107-
// if (installLocation.includes('homebrew')) {
108-
// await $.spawn('brew uninstall awscli', { interactive: true, env: { HOMEBREW_NO_AUTO_UPDATE: 1 } });
109-
// return;
110-
// }
107+
if (installLocation.includes('homebrew')) {
108+
await $.spawn('brew uninstall awscli', { interactive: true, env: { HOMEBREW_NO_AUTO_UPDATE: 1 } });
109+
return;
110+
}
111111

112112
if (Utils.isLinux()) {
113113
// Remove symlinks from bin dir

src/resources/homebrew/homebrew.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ export class HomebrewResource extends Resource<HomebrewConfig> {
112112

113113
override async destroy(): Promise<void> {
114114
const $ = getPty();
115+
116+
const { status } = await $.spawnSafe('which brew');
117+
if (status === SpawnStatus.ERROR) {
118+
return;
119+
}
120+
115121
const homebrewInfo = await $.spawn('brew config', { interactive: true });
116122
const homebrewDirectory = this.getCurrentLocation(homebrewInfo.data)
117123

0 commit comments

Comments
 (0)