scm does not respect $HOME variable for .jazz-scm folder?
I'm trying to move my .jazz-scm folder from home $HOME folder to some other folder that I have specified. However, scm.sh does not seem to respect it.
[ --config ]
path
The Rational Team Concert source control command line client stores per-user metadata in a configuration directory. The configuration directory is normally $HOME/.jazz-scm, where $HOME represents your home directory. If you want to use a different configuration directory, specify its path name in
path
.
Eric
However, when I try the following:
# export HOME=/home/eric/jbe# scm login --repository-uri https://scm.ngf.local/ccm --username eric
it still creates my .jazz-scm folder under /home/eric and not /home/eric/jbe!
Is it not $HOME that it is using? Should I be setting a different environment variable instead?
Thanks,
Eric
One answer
In Java Land home is the property user.home (e.g. java -Duser.home ..... ). Plus, HOME should be treated as read-only as setting it may have no effect or certainly not the desired effect. I'm going to wager that the java is taking the value of user.home if --config is not specified.
I ran strace on an scm login command. There is no call to getenv of any variety and if I redefine HOME as you have found no scm data is written there. Using --config with explicit path works.
I ran strace on an scm login command. There is no call to getenv of any variety and if I redefine HOME as you have found no scm data is written there. Using --config with explicit path works.
Comments
I was afraid that might be happening. I was hoping to find an environment variable to control the location of the .jazz-scm directory as modifying the parameters passed to scm is quite difficult, so passing the --config <path>
parameter is not as simple as you might expect.
You can either specify --config or you can set the environment variable SCM_CONFIG_DIRECTORY. Here is the link to the list of environment variables: https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/c_scm_cli_env_var.html&scope=null