Skip to content

Commit

Permalink
fix config docs paths
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Apr 19, 2022
1 parent 0644dc8 commit d13afd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/helpers/configenvextractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ func GenerateIntermediateCode(templatePath string, intermediateCodePath string,

func RunIntermediateCode(intermediateCodePath string) {
fmt.Println("Running intermediate go code for " + intermediateCodePath)
os.Setenv("OCIS_BASE_DATA_PATH", "~/.ocis")
os.Setenv("OCIS_CONFIG_DIR", "~/.ocis")
os.Setenv("HOME", "~") // don't write the current absolute user directory for the documentation
out, err := exec.Command("go", "run", intermediateCodePath).Output()
if err != nil {
log.Fatal(err)
Expand Down
1 change: 0 additions & 1 deletion ocis-pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ type Config struct {
Thumbnails *thumbnails.Config `yaml:"thumbnails"`
WebDAV *webdav.Config `yaml:"webdav"`

ConfigPath string `yaml:"-"` // TODO: use me ?
ConfigFile string `yaml:"-" env:"OCIS_CONFIG_FILE" desc:"config file to be used by the oCIS runtime"`
}
4 changes: 2 additions & 2 deletions ocis-pkg/config/defaults/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func BaseDataPath() string {
// fallback to BaseDatapathValue for users without home
return BaseDataPathValue
}
return path.Join(dir, ".ocis", "config")
return path.Join(dir, ".ocis")
case "path":
return BaseDataPathValue
default:
Expand Down Expand Up @@ -65,7 +65,7 @@ func BaseConfigPath() string {
// fallback to BaseConfigPathValue for users without home
return BaseConfigPathValue
}
return path.Join(dir, ".ocis")
return path.Join(dir, ".ocis", "config")
case "path":
return BaseConfigPathValue
default:
Expand Down

0 comments on commit d13afd5

Please sign in to comment.