diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-07-20 15:17:21 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-07-20 15:17:21 +0200 |
commit | 75ddecfe3c675855304f8ffa96a7d5dd3b8dae33 (patch) | |
tree | 395204c49622e4392c70b24a415ac847fba7c24d /lib/xdsserver | |
parent | b7bc9102de461eb880d951f16bdd9ded74e43a4f (diff) |
Add XDS_SERVER_WORKSPACE_DIR env var supportflounder_5.99.2flounder/5.99.25.99.2
By default xds-server uses $HOME/xds-workspace directory to access to
user shared workspace directory. This root directory may be
changed by defining XDS_SERVER_WORKSPACE_DIR environment variable.
Change-Id: Ib786ba9a954b0b093216295d37236a80f78f2f2c
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/xdsserver')
-rw-r--r-- | lib/xdsserver/sdks.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/xdsserver/sdks.go b/lib/xdsserver/sdks.go index ee6a269..47d48d5 100644 --- a/lib/xdsserver/sdks.go +++ b/lib/xdsserver/sdks.go @@ -25,6 +25,7 @@ import ( "sync" common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/golib" + "gerrit.automotivelinux.org/gerrit/src/xds/xds-server/lib/xdsconfig" "gerrit.automotivelinux.org/gerrit/src/xds/xds-server/lib/xsapiv1" ) @@ -349,7 +350,8 @@ func (s *SDKs) Install(id, filepath string, force bool, timeout int, args []stri } else if filepath != "" { // FIXME support any location and also sharing either by pathmap or Syncthing - baseDir := "${HOME}/xds-workspace/sdks" + + baseDir := path.Join(xdsconfig.WorkspaceRootDir(), "sdks") sdkFilename, _ = common.ResolveEnvVar(path.Join(baseDir, path.Base(filepath))) if !common.Exists(sdkFilename) { return nil, fmt.Errorf("SDK file not accessible, must be in %s", baseDir) |