wfly bin\*.conf.ps1 files question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

wfly bin\*.conf.ps1 files question

Rebecca Searls

I don't understand the reason for setting the (local) variable JAVA_OPTS
in the *.conf.ps1 files when the common.ps1 functions completely ignores
the local setting and always reads and uses the environment variable value.

The in-file comments leads the reader to believe he can override the system
env var and define a new JAVA_OPTS in the conf file which will be used by the
calling script.  Currently this is not true.

Can someone explain the intent here?  Is this a bug or obsolete code that
should be removed?


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: wfly bin\*.conf.ps1 files question

Tomaž Cerar-2
Hey Rebecca,

I've initially wrote that script but to be fair I do not really remember reasoning behind every detail...

But one thing I do remember is that enviroment variables have different scopes.
and should not be equaled to how env variables in powershell work comparing to linux.

So you have scopes which can be
- system enviroment, (which can differ as per user/per whole system)
- script local (bit special with imports/includes)
- process local

and I do remember I did play around with process scope a bit to get some stuff working.

Main goal was to have common.ps1 that would have common logic for all scripts.
and than the actual scripts (standalone.ps1, jboss-cli.ps1,...) would just have the extra specifics.

One thing I was also looking into was creating common.ps1 as a powershell module [1] [2],
that would server as that "common" part and it would simplify things even more.
But I never got to finishing it.

I know this is all really vague, but I still hope it will help a bit.

cheers,
tomaz




On Wed, May 23, 2018 at 8:53 PM, Rebecca Searls <[hidden email]> wrote:

I don't understand the reason for setting the (local) variable JAVA_OPTS
in the *.conf.ps1 files when the common.ps1 functions completely ignores
the local setting and always reads and uses the environment variable value.

The in-file comments leads the reader to believe he can override the system
env var and define a new JAVA_OPTS in the conf file which will be used by the
calling script.  Currently this is not true.

Can someone explain the intent here?  Is this a bug or obsolete code that
should be removed?


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev