Skip to content

Commit

Permalink
fix: pass the environment when validate workspace provider
Browse files Browse the repository at this point in the history
The environment must be passed to the tool to ensure that the workspace provider
has all the configuration variables it needs.

Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Feb 12, 2025
1 parent 13f47c0 commit 1cc78ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/services/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ func New(ctx context.Context, config Config) (*Services, error) {

run, err := c.Run(ctx, fmt.Sprintf("Validate Environment Variables from %s", workspaceTool), gptscript.Options{
Input: fmt.Sprintf(`{"provider":"%s"}`, config.WorkspaceProviderType),
GlobalOptions: gptscript.GlobalOptions{
Env: os.Environ(),
},
})
if err != nil {
return nil, fmt.Errorf("failed to validate environment variables: %w", err)
Expand Down

0 comments on commit 1cc78ed

Please sign in to comment.