diff --git a/command/cmd.go b/command/cmd.go index 3700888..a28eec0 100644 --- a/command/cmd.go +++ b/command/cmd.go @@ -49,11 +49,13 @@ func (r *Command) Run() (err error) { // task Report.Activity. func (r *Command) RunWith(ctx context.Context) (err error) { r.Writer.reporter = &r.Reporter - r.Reporter.file, err = addon.File.Touch(path.Base(r.Path) + ".output") + output := path.Base(r.Path) + ".output" + r.Reporter.file, err = addon.File.Touch(output) if err != nil { return } r.Reporter.Run(r.Path, r.Options) + addon.Attach(r.Reporter.file) defer func() { r.Writer.End() if err != nil { diff --git a/command/reporter.go b/command/reporter.go index 728193a..4c7656d 100644 --- a/command/reporter.go +++ b/command/reporter.go @@ -113,5 +113,4 @@ func (r *Reporter) append(batch []byte) { if err != nil { panic(err) } - addon.Attach(r.file) } diff --git a/go.mod b/go.mod index 0299f74..89807e7 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/konveyor/tackle2-hub v0.2.2-0.20230731153407-22bf2d68128a ) -replace github.com/konveyor/tackle2-hub => github.com/jortel/tackle2-hub v0.0.0-20231214202827-edb699d547a3 +replace github.com/konveyor/tackle2-hub => github.com/jortel/tackle2-hub v0.0.0-20231216153645-0500f20f2fbe require ( github.com/Nerzal/gocloak/v10 v10.0.1 // indirect diff --git a/go.sum b/go.sum index 04e788d..d5c39ad 100644 --- a/go.sum +++ b/go.sum @@ -113,8 +113,8 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jortel/go-utils v0.1.2 h1:R0TcGRCcwoL793CymcKC5AF9idWXT2cR6eQ2xpBUsoI= github.com/jortel/go-utils v0.1.2/go.mod h1:sl6vav63ODI0sUfSz8e0pImNmCVFnVsuOFhZmwe9GDk= -github.com/jortel/tackle2-hub v0.0.0-20231214202827-edb699d547a3 h1:ffCbcMvhEwQIDYS5I7ZZPH0wNeXhihIPgNcplGLIedA= -github.com/jortel/tackle2-hub v0.0.0-20231214202827-edb699d547a3/go.mod h1:2ApwTxjVnIb3tP7XZKCEQdITsOgNHOeJ6qvchDsINFE= +github.com/jortel/tackle2-hub v0.0.0-20231216153645-0500f20f2fbe h1:TPYKQczsWAATEPJJQ1dIL201N9bpCCpbYcQvPESGqxw= +github.com/jortel/tackle2-hub v0.0.0-20231216153645-0500f20f2fbe/go.mod h1:2ApwTxjVnIb3tP7XZKCEQdITsOgNHOeJ6qvchDsINFE= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=