Alternative groovysh.profile script

Is there a way to override the location of the groovysh.profile / groovysh.rc file on the command line? eg.

GROOVYSH_RC = one_time_groovysh_rc groovysh

Thank.

+1


source to share


1 answer


When looking at the source at Groovysh.groovy, it calls this method:

File getUserStateDirectory() {
    def userHome = new File(System.getProperty('user.home'))
    def dir = new File(userHome, '.groovy')
    return dir.canonicalFile
}

      



It looks like you can set the user.home property to change the root, but it still expects .groovy inside that directory (-Duser.home = "/ foo").

+1


source







All Articles