We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad27052 commit 3546ea4Copy full SHA for 3546ea4
1 file changed
src/resources/java/jenv/jenv.ts
@@ -104,10 +104,9 @@ export class JenvResource extends Resource<JenvConfig> {
104
const $ = getPty();
105
106
if (Utils.isMacOS()) {
107
- const brewPrefix = await $.spawnSafe('brew --prefix', { interactive: true });
108
- if (brewPrefix.status === SpawnStatus.SUCCESS) {
109
- const jenvPath = await $.spawnSafe('which jenv', { interactive: true });
110
- if (jenvPath.status === SpawnStatus.SUCCESS && jenvPath.data.trim().startsWith(brewPrefix.data.trim())) {
+ if (await Utils.isHomebrewInstalled()) {
+ const isHomebrewInstall = await $.spawnSafe('brew list jenv', { interactive: true });
+ if (isHomebrewInstall.status === SpawnStatus.SUCCESS) {
111
await $.spawn('brew uninstall jenv', { interactive: true });
112
}
113
0 commit comments