summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-20 22:29:59 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-20 22:29:59 +0200
commit8f41ac456fc92a9ec333579498e9933d73404905 (patch)
tree6be8211c41c7ff19a6b23bd1d1d289a39bd6373e /main.go
parentdd62e1e5ec325c77164c578d11ba4c0e118307d9 (diff)
Remove duplicate fields and set default SDK dir.
- Removed duplicate fields between Config and FileConfig - set /xdt/sdk as default SDK directory
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.go b/main.go
index 8d49bab..fd1480e 100644
--- a/main.go
+++ b/main.go
@@ -179,12 +179,16 @@ func xdsApp(cliCtx *cli.Context) error {
return cli.NewExitError(err, 2)
}
for _, stFld := range stCfg.Folders {
- relativePath := strings.TrimPrefix(stFld.RawPath, ctx.Config.ShareRootDir)
+ relativePath := strings.TrimPrefix(stFld.RawPath, ctx.Config.FileConf.ShareRootDir)
if relativePath == "" {
relativePath = stFld.RawPath
}
- newFld := xdsconfig.NewFolderConfig(stFld.ID, stFld.Label, ctx.Config.ShareRootDir, strings.TrimRight(relativePath, "/"), defaultSdk)
+ newFld := xdsconfig.NewFolderConfig(stFld.ID,
+ stFld.Label,
+ ctx.Config.FileConf.ShareRootDir,
+ strings.TrimRight(relativePath, "/"),
+ defaultSdk)
ctx.Config.Folders = ctx.Config.Folders.Update(xdsconfig.FoldersConfig{newFld})
}