Skip to content

Commit

Permalink
Add debug logs in publish
Browse files Browse the repository at this point in the history
Signed-off-by: Nassim 'Nass' Eddequiouaq <[email protected]>
  • Loading branch information
n4ss committed Mar 3, 2017
1 parent 7e74573 commit d6ba9f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,12 @@ func (r *NotaryRepository) publish(cl changelist.Changelist) error {
if _, ok := err.(ErrRepositoryNotExist); ok {
err := r.bootstrapRepo()
if _, ok := err.(store.ErrMetaNotFound); ok {
logrus.Debugf("No metadata found on disk, initializing repository %s from scratch", r.gun.String())
err = r.Initialize(nil)
}

if err != nil {
logrus.Debugf("Unable to initialize repository at publish-time: %s", err.Error())
return err
}

Expand Down
3 changes: 1 addition & 2 deletions cmd/notary/tuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ func (t *tufCommander) AddToCommand(cmd *cobra.Command) {
cmdReset.Flags().BoolVar(&t.resetAll, "all", false, "Reset all changes shown in the status list")
cmd.AddCommand(cmdReset)

cmdTUFPublish := cmdTUFPublishTemplate.ToCommand(t.tufPublish)
cmd.AddCommand(cmdTUFPublish)
cmd.AddCommand(cmdTUFPublishTemplate.ToCommand(t.tufPublish))

cmd.AddCommand(cmdTUFLookupTemplate.ToCommand(t.tufLookup))

Expand Down

0 comments on commit d6ba9f9

Please sign in to comment.