Skip to content

Commit 32e544c

Browse files
bug: load vcs support in embedded server always (#858)
* bug: load vcs support in embedded server always * chore: try always running exec for "sh -c" in engine
1 parent 8ecad90 commit 32e544c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Diff for: main.go

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package main
22

33
import (
44
"github.com/gptscript-ai/gptscript/pkg/cli"
5-
// Load all VCS
6-
_ "github.com/gptscript-ai/gptscript/pkg/loader/vcs"
75
)
86

97
func main() {

Diff for: pkg/engine/cmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func (e *Engine) newCommand(ctx context.Context, extraEnv []string, tool types.T
328328
}
329329

330330
if useShell {
331-
args = append([]string{"/bin/sh", "-c"}, strings.Join(args, " "))
331+
args = append([]string{"/bin/sh", "-c"}, "exec "+strings.Join(args, " "))
332332
} else {
333333
args[0] = env.Lookup(envvars, args[0])
334334
}

Diff for: pkg/gptscript/gptscript.go

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import (
2525
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes"
2626
"github.com/gptscript-ai/gptscript/pkg/runner"
2727
"github.com/gptscript-ai/gptscript/pkg/types"
28+
29+
// Load all VCS
30+
_ "github.com/gptscript-ai/gptscript/pkg/loader/vcs"
2831
)
2932

3033
var log = mvl.Package()

0 commit comments

Comments
 (0)