cakebrewjs
cakebrewjs copied to clipboard
App doesn't work with non-standard installation
This looks like an awesome project! However, it appears that Homebrew installations that aren't in /opt/homebrew
aren't recognized by the operating system. Are there plans to change this e.g. by checking for the HOMEBREW_PREFIX
environment variable or by looking in all locations on path?
Nevermind, just found the settings menu. Should I close this?
Actually you can help (if you'd like) by answering this...
I have added already
https://github.com/shemeshg/cakebrewjs/blob/947c85a2f0e39bd3b6cc76cad31dc04cc4279a22/src/src/Ls.ts#L14
Can you confirm if it is correct/incorrect/or how should be modified?
get senceBrewLocation(){
const existsSync = require("electron").remote.require("fs").existsSync
if (existsSync("/opt/homebrew/bin/brew")){
this.brewLocation = "/opt/homebrew/bin/brew"
return "/opt/homebrew/bin/brew"
} else if (existsSync("/usr/local/bin/brew")) {
this.brewLocation = "/usr/local/bin/brew"
return "/usr/local/bin/brew"
} else {
return "/usr/local/bin/brew"
}
}
To test default behavior on your machine you can
-
Manu->View->toggle devtools
-
Delete the local storage.
-
If you can clone the project and test it locally and submit PR it would be more then awesome (it is just
git clone
and thennpm run electron:serve
(But don't feel fearful if step [3] it is too much to ask) .. -
I assume
brew --prefix
is alwaysbrewLocation.replace("/bin/brew","")
for example
% brew --prefix
/usr/local
% which brew
/usr/local/bin/brew
%
so caskroom
would be at ${brewPrefix}/Caskroom/
that is for example /usr/local/Caskroom
. is this not always the case?
Thanks Shemeshg