Hi! I have encountered this problem when trying to...
# compose-desktop
a
Hi! I have encountered this problem when trying to develop my first desktop app: contents of the PATH environment variable acquired from
System.getenv()
are much smaller when running a packaged Compose for Desktop app on macOS. However, when running the same app from the IDE using various Gradle tasks, PATH env var has full content. I've filed a bug on YouTrack, but also wanted to ask here — has anyone encountered this?
solved 1
j
Yes, this is normal macOS behavior
If you are not launching from a shell then you will not see shell-specific path additions
a
Can you point me to the macOS docs mentioning this behavior? I would really appreciate that 😄 Is there a way to change this behavior? My usecase is this: I use JGit to commit some code, and the git repo has pre-commit hook (bash script) that checks if you have
git-lfs
binary installed. I not, it fails the commit.
j
I think you can edit
/etc/paths
or add an entry to
/etc/path.d
(whatever it's called)
Otherwise there's some launchctl stuff in https://apple.stackexchange.com/q/51677, but who knows if that still works today
a
Thanks a lot! It seems like I will be doing this: AppleScript-generated launcher app ->
open -a /Applications/ComposeApp.app
,
delay 1 (second)
, and
close Terminal
😅 Seems unconventional and hacky, but works.
c
just curious. what are you building that requires env vars? im intrigued