File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ type initRunner struct {
5555
5656func newInitRunner (cfg * config.Config ) (* initRunner , error ) {
5757 if ok , err := cfg .IsValid (); ! ok || err != nil {
58- return nil , fmt .Errorf ("invalid config: %+v " , cfg )
58+ return nil , fmt .Errorf ("invalid config: %w " , err )
5959 }
6060
6161 return & initRunner {
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ func TestNewInitRunner(t *testing.T) {
3131 }{
3232 {
3333 name : "valid config" ,
34- cfg : & config.Config {},
34+ cfg : & config.Config {
35+ Repo : "/tmp/repo" ,
36+ },
3537 },
3638 {
3739 name : "invalid config" ,
@@ -57,7 +59,7 @@ func TestNewInitRunner(t *testing.T) {
5759 return
5860 }
5961 if err != nil {
60- t .Errorf ("newInitRunner() got nil runner , want non- nil" )
62+ t .Errorf ("newInitRunner() = %v , want nil" , err )
6163 }
6264 })
6365 }
You can’t perform that action at this time.
0 commit comments