Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from vania-pooh/master
Browse files Browse the repository at this point in the history
Using absolute paths for config dir (fixes #34)
  • Loading branch information
aandryashin authored Jun 20, 2017
2 parents e1e645d + 1f1f926 commit 0ed552d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/selenoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ var selenoidCmd = &cobra.Command{

func getConfigDir(elem ...string) string {
usr, err := user.Current()
var p string
if err != nil {
return filepath.Join(elem...)
p = filepath.Join(elem...)
}
return filepath.Join(append([]string{usr.HomeDir}, elem...)...)
p = filepath.Join(append([]string{usr.HomeDir}, elem...)...)
ap, _ := filepath.Abs(p)
return ap
}

func getSelenoidConfigDir() string {
Expand Down

0 comments on commit 0ed552d

Please sign in to comment.