@@ -115,7 +115,7 @@ func GetSpec(diggerUrl string, authToken string, command string, actor string, p
115
115
}
116
116
117
117
if resp .StatusCode != http .StatusOK {
118
- return nil , fmt .Errorf ("unexpected status when reporting a project : %v" , resp .StatusCode )
118
+ return nil , fmt .Errorf ("unexpected status when getting spec : %v" , resp .StatusCode )
119
119
}
120
120
121
121
body , err := io .ReadAll (resp .Body )
@@ -188,14 +188,14 @@ var execCmd = &cobra.Command{
188
188
189
189
defaultBanch , err := getDefaultBranch ()
190
190
if err != nil {
191
- log .Printf ("could not get default branch: %v" , err )
192
- os . Exit ( 1 )
191
+ log .Printf ("could not get default branch, please enter manually:" )
192
+ fmt . Scanln ( & defaultBanch )
193
193
}
194
194
195
195
prBranch , err := getPrBranch ()
196
196
if err != nil {
197
- log .Printf ("could not get pr branch: %v" , err )
198
- os . Exit ( 1 )
197
+ log .Printf ("could not get current branch, please enter manually:" )
198
+ fmt . Scanln ( & prBranch )
199
199
}
200
200
201
201
projectName := execConfig .Project
@@ -219,6 +219,9 @@ var execCmd = &cobra.Command{
219
219
}
220
220
221
221
specBytes , err := GetSpec (diggerHostname , "abc123" , command , actor , string (projectMarshalled ), string (configMarshalled ), repoFullname , defaultBanch , prBranch )
222
+ if err != nil {
223
+ log .Printf ("failed to get spec from backend: %v" , err )
224
+ }
222
225
var spec spec.Spec
223
226
err = json .Unmarshal (specBytes , & spec )
224
227
0 commit comments