@@ -379,7 +379,7 @@ func renderer(
379
379
case step .CLICommand != nil && results [i ].CLICommandResult != nil :
380
380
renderCLICommand (* step .CLICommand , * results [i ].CLICommandResult , failure , isSubmit , ch , i )
381
381
case step .HTTPRequest != nil && results [i ].HTTPRequestResult != nil :
382
- renderHTTPRequest (* step .HTTPRequest , * results [i ].HTTPRequestResult , failure , isSubmit , ch , i )
382
+ renderHTTPRequest (* step .HTTPRequest , * results [i ].HTTPRequestResult , failure , isSubmit , data . BaseURL , ch , i )
383
383
default :
384
384
cobra .CheckErr ("unable to run lesson: missing results" )
385
385
}
@@ -467,13 +467,21 @@ func renderHTTPRequest(
467
467
result api.HTTPRequestResult ,
468
468
failure * api.StructuredErrCLI ,
469
469
isSubmit bool ,
470
+ baseURL * string ,
470
471
ch chan tea.Msg ,
471
472
index int ,
472
473
) {
473
- url := req .Request .Path
474
+ url := ""
475
+ overrideBaseURL := viper .GetString ("override_base_url" )
476
+ if overrideBaseURL != "" {
477
+ url = overrideBaseURL
478
+ } else if baseURL != nil && * baseURL != "" {
479
+ url = * baseURL
480
+ }
474
481
if req .Request .FullURL != "" {
475
482
url = req .Request .FullURL
476
483
}
484
+ url += req .Request .Path
477
485
ch <- startStepMsg {
478
486
url : checks .InterpolateVariables (url , result .Variables ),
479
487
method : req .Request .Method ,
0 commit comments