cmd/syncthing: Add cli as a subcommand (fixes #6566, fixes #4719) (#7364)

* cmd/syncthing: Add cli as a subcommand (fixes #6566, fixes #4719)

* Hijack help

* Add comment

* Revert go.mod/go.sum
This commit is contained in:
Audrius Butkevicius
2021-02-15 18:50:53 +01:00
committed by GitHub
parent b2c9e7b07b
commit fb078068b4
8 changed files with 107 additions and 88 deletions
+7
View File
@@ -68,6 +68,13 @@ func init() {
}
func SetBaseDir(baseDirName BaseDirEnum, path string) error {
if !filepath.IsAbs(path) {
var err error
path, err = filepath.Abs(path)
if err != nil {
return err
}
}
_, ok := baseDirs[baseDirName]
if !ok {
return fmt.Errorf("unknown base dir: %s", baseDirName)