Skip to content

Commit 4a39d26

Browse files
authored
Merge pull request #386 from guillaumerose/main
2 parents 44e2d06 + 77e2c3e commit 4a39d26

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pkg/cmd/tknpac/resolve/resolve.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ func Command(run *params.Run) *cobra.Command {
7171
return err
7272
}
7373
}
74+
75+
if err := run.GetConfigFromConfigMap(ctx); err != nil {
76+
log.Printf("Warning: cannot get pipelines-as-code config map in pipelines-as-code namespace. Using defaults. Error: %v\n", err)
77+
}
78+
7479
if len(filenames) == 0 {
7580
return fmt.Errorf("you need to at least specify a file with -f")
7681
}

pkg/cmd/tknpac/resolve/resolve_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestSplitArgsInMap(t *testing.T) {
4242

4343
func TestCommandFilenameSetProperly(t *testing.T) {
4444
cs := &params.Run{
45-
Clients: clients.Clients{ClientInitialized: true},
45+
Clients: clients.Clients{ClientInitialized: false},
4646
Info: info.Info{Pac: &info.PacOpts{}},
4747
}
4848
cmd := Command(cs)

pkg/params/run.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ func New() *Run {
7070
return &Run{
7171
Info: info.Info{
7272
Event: &info.Event{},
73-
Pac: &info.PacOpts{},
73+
Pac: &info.PacOpts{
74+
ApplicationName: info.PACApplicationName,
75+
HubURL: info.HubURL,
76+
},
7477
},
7578
}
7679
}

0 commit comments

Comments
 (0)