Skip to content

Commit d36cdf2

Browse files
committed
fix: add ExtraEnv to config
Additionally, add a .gitignore. Signed-off-by: Donnie Adams <[email protected]>
1 parent 4a5ff43 commit d36cdf2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode/
2+
.idea/
3+
.DS_Store

run.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type RunOptions struct {
2424
ChatState string
2525
SaveChatStateFile string
2626
Workspace string
27+
ExtraEnv []string
2728
}
2829

2930
func first[T comparable](in ...T) (result T) {
@@ -44,6 +45,7 @@ func complete(opts ...RunOptions) (result RunOptions) {
4445
result.Workspace = first(opt.Workspace, result.Workspace)
4546
result.SaveChatStateFile = first(opt.SaveChatStateFile, result.SaveChatStateFile)
4647
result.ChatState = first(opt.ChatState, result.ChatState)
48+
result.ExtraEnv = append(result.ExtraEnv, opt.ExtraEnv...)
4749
}
4850
return
4951
}
@@ -89,6 +91,7 @@ func Run(ctx context.Context, tool string, opts ...RunOptions) error {
8991
SubTool: opt.SubTool,
9092
Workspace: opt.Workspace,
9193
ChatState: opt.ChatState,
94+
Env: opt.ExtraEnv,
9295
})
9396
if err != nil {
9497
return err

0 commit comments

Comments
 (0)