备用groovysh.profile脚本
是否有方法覆盖命令行上的备用groovysh.profile脚本,groovy,Groovy,是否有方法覆盖命令行上的groovysh.profile/groovysh.rc文件的位置?e、 g GROOVYSH_RC=one_time_groovysh_rc groovysh 谢谢。在查看Groovysh.groovy的源代码时,它调用以下方法: File getUserStateDirectory() { def userHome = new File(System.getProperty('user.home')) def dir = new File(userH
groovysh.profile
/groovysh.rc
文件的位置?e、 g
GROOVYSH_RC=one_time_groovysh_rc groovysh
谢谢。在查看Groovysh.groovy的源代码时,它调用以下方法:
File getUserStateDirectory() {
def userHome = new File(System.getProperty('user.home'))
def dir = new File(userHome, '.groovy')
return dir.canonicalFile
}
看起来您可以设置“user.home”属性来更改根目录,但它仍然需要该目录中的.groovy(-Duser.home=“/foo”)。在查看Groovysh.groovy的源代码时,它调用以下方法:
File getUserStateDirectory() {
def userHome = new File(System.getProperty('user.home'))
def dir = new File(userHome, '.groovy')
return dir.canonicalFile
}
看起来您可以设置“user.home”属性来更改根目录,但该目录中仍需要一个.groovy(-Duser.home=“/foo”)