File tree Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -410,24 +410,30 @@ func (c buildConfig) Prompt() (buildConfig, error) {
410410 Default : c .Push ,
411411 },
412412 },
413- {
414- Name : "builderImage" ,
415- Prompt : & survey.Input {
416- Message : "Optional custom builder image:" ,
417- Default : c .BuilderImage ,
418- },
419- },
420- {
421- Name : "baseImage" ,
422- Prompt : & survey.Input {
423- Message : "Optional base image for your function (host builder only):" ,
424- Default : c .BaseImage ,
425- },
426- },
427413 }
428414
429415 err = survey .Ask (qs , & c )
430- return c , err
416+ if err != nil {
417+ return c , err
418+ }
419+
420+ if c .Builder == "host" {
421+ hostQs := []* survey.Question {
422+ {
423+ Name : "baseImage" ,
424+ Prompt : & survey.Input {
425+ Message : "Optional base image for your function (host builder only):" ,
426+ Default : c .BaseImage ,
427+ },
428+ },
429+ }
430+ err = survey .Ask (hostQs , & c )
431+ if err != nil {
432+ return c , err
433+ }
434+ }
435+
436+ return c , nil
431437}
432438
433439// Validate the config passes an initial consistency check
You can’t perform that action at this time.
0 commit comments