neilcsmith-net commented on PR #8756: URL: https://github.com/apache/netbeans/pull/8756#issuecomment-3242962380
> I am a bit worried about the can of worms this opens (why is javac, mvn, ant etc not in path too etc) and that it is set by default without opt-in or out. +1 > I am wondering if `PATH` is even the right vehicle for this. Letting the NB terminal run `alias nb=NB_LAUNCHER_PATH` on start might have the smallest risk for side effects and cover the intended usecase. I hadn't thought about setting an alias based on the environment variable, but that's a good idea. I think, set up something like `NB_BASEDIR` and `NB_LAUNCHER` in the launchers, and the rest can be addressed elsewhere in the codebase over time. It might actually be good to have a customizable script in the userdir that is invoked similarly to `~/.profile` and could be used to set up aliases. There's a few other setup things done - here iirc - https://github.com/apache/netbeans/blob/master/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java#L269 But in the shorter term, the environment variable could still be invoked directly or used to set an alias manually. Having basedir in there too could allow for pointing aliases at some of those other things you mentioned, should people wish to. The launcher variable would need to be kept separate to the basedir, and only set if not already configured, so the various package scripts can use it to route through themselves. > and it could have NB_DEFAULT_JDK etc too in future) Maybe. Some of the packages set `JAVA_HOME` here, and I think that could be good in the launchers. That does count as a situation where the terminal in the IDE may behave differently to the system mind you (though probably rightly IMO). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
