Skip to content

Commit

Permalink
feat(snap): use new version of hooks with bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Mengyi Wang <[email protected]>
  • Loading branch information
MonicaisHer committed Apr 22, 2022
1 parent 9fb6fe9 commit 4e97571
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions snap/local/hooks/cmd/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ func main() {

}

log.SetComponentName("configure")
if err := options.ProcessAppConfig("device-mqtt"); err != nil {
hooks.Error(fmt.Sprintf("could not process options: %v", err))
os.Exit(1)
}

// read env var override configuration
envJSON, err = cli.Config(hooks.EnvConfig)
if err != nil {
Expand Down Expand Up @@ -101,10 +107,4 @@ func main() {
hooks.Error(fmt.Sprintf("Invalid value for 'autostart' : %s", autostart))
os.Exit(1)
}

log.SetComponentName("configure")
if err := options.ProcessAppConfig("device-mqtt"); err != nil {
hooks.Error(fmt.Sprintf("could not process options: %v", err))
os.Exit(1)
}
}
2 changes: 2 additions & 0 deletions snap/local/hooks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ module github.com/edgexfoundry/device-mqtt-go/hooks
require github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.2.0.20220420075917-7fdbcd41ba0b

go 1.17

replace github.com/canonical/edgex-snap-hooks/v2 => github.com/farshidtz/edgex-snap-hooks/v2 v2.0.6-0.20220422071606-d43ccc771100
4 changes: 2 additions & 2 deletions snap/local/hooks/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.2.0.20220420075917-7fdbcd41ba0b h1:vKrKzgdZo3kk0mptvQ1vvUUUQ2eYjE+nDMhT2tC9UJw=
github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.2.0.20220420075917-7fdbcd41ba0b/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/farshidtz/edgex-snap-hooks/v2 v2.0.6-0.20220422071606-d43ccc771100 h1:LpQTdrArglZpFxKC7o8WcddLoAeO4CBt32DyeVHtGys=
github.com/farshidtz/edgex-snap-hooks/v2 v2.0.6-0.20220422071606-d43ccc771100/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down

0 comments on commit 4e97571

Please sign in to comment.