Skip to content

Commit b2b58bb

Browse files
committed
chore: set the run file env var when starting the ui
Set the `UI_RUN_FILE` env var before starting the UI tool when a run file is provided; e.g. `gptscript --ui <run-file.gpt>`. This tells the UI to use the file's run page as the landing page on start. Signed-off-by: Nick Hale <[email protected]>
1 parent 9ca6e93 commit b2b58bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cli/gptscript.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
371371
gptOpt.Env = append(gptOpt.Env, "GPTSCRIPT_SDKSERVER_CREDENTIAL_OVERRIDE="+strings.Join(r.CredentialOverride, ","))
372372
}
373373

374-
args = append([]string{args[0]}, "--file="+file)
374+
gptOpt.Env = append(gptOpt.Env, "UI_RUN_FILE="+file)
375375

376376
if len(args) > 2 {
377377
args = append(args, args[2:]...)

0 commit comments

Comments
 (0)