Skip to content

Commit

Permalink
Log if app purchase was required and executed (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
tux-mind authored Feb 10, 2025
1 parent 37af8f8 commit e5291ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func downloadCmd() *cobra.Command {

var lastErr error
var acc appstore.Account
var purchased bool = false

return retry.Do(func() error {
infoResult, err := dependencies.AppStore.AccountInfo()
Expand Down Expand Up @@ -63,6 +64,10 @@ func downloadCmd() *cobra.Command {
if err != nil {
return err
}
purchased = true
dependencies.Logger.Verbose().
Bool("success", true).
Msg("purchase")
}

interactive, _ := cmd.Context().Value("interactive").(bool)
Expand Down Expand Up @@ -96,6 +101,7 @@ func downloadCmd() *cobra.Command {

dependencies.Logger.Log().
Str("output", out.DestinationPath).
Bool("purchased", purchased).
Bool("success", true).
Send()

Expand Down

0 comments on commit e5291ba

Please sign in to comment.