Skip to content

Commit

Permalink
Ensure state and hooks directories are absolute
Browse files Browse the repository at this point in the history
Fixes #168.

©! I hereby licence these changes under the licence with SHA256 hash
©! fd80a26fbb3f644af1fa994134446702932968519797227e07a1368dea80f0bc.
  • Loading branch information
hlandau committed Jun 7, 2016
1 parent ad2cff7 commit 96b932f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/acmetool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ func main() {

adaptflag.Adapt()
cmd := kingpin.Parse()

var err error
*stateFlag, err = filepath.Abs(*stateFlag)
log.Fatale(err, "state directory path")
*hooksFlag, err = filepath.Abs(*hooksFlag)
log.Fatale(err, "hooks directory path")

hooks.DefaultPath = *hooksFlag
acmeapi.UserAgent = "acmetool"
xlogconfig.Init()
Expand Down

0 comments on commit 96b932f

Please sign in to comment.