Skip to content

Commit 13b75b6

Browse files
ibuildtheclouddrpebcak
authored andcommitted
feat: add basic bash support for windows
1 parent c8cf310 commit 13b75b6

File tree

14 files changed

+243
-32
lines changed

14 files changed

+243
-32
lines changed

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ require (
3333
github.com/xeipuuv/gojsonschema v1.2.0
3434
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc
3535
golang.org/x/sync v0.7.0
36-
golang.org/x/term v0.20.0
36+
golang.org/x/term v0.22.0
3737
gopkg.in/yaml.v3 v3.0.1
3838
gotest.tools/v3 v3.5.1
3939
sigs.k8s.io/yaml v1.4.0
@@ -108,10 +108,10 @@ require (
108108
github.com/yuin/goldmark v1.5.4 // indirect
109109
github.com/yuin/goldmark-emoji v1.0.2 // indirect
110110
go4.org v0.0.0-20200411211856-f5505b9728dd // indirect
111-
golang.org/x/mod v0.17.0 // indirect
112-
golang.org/x/net v0.24.0 // indirect
113-
golang.org/x/sys v0.20.0 // indirect
114-
golang.org/x/text v0.15.0 // indirect
115-
golang.org/x/tools v0.20.0 // indirect
111+
golang.org/x/mod v0.19.0 // indirect
112+
golang.org/x/net v0.27.0 // indirect
113+
golang.org/x/sys v0.22.0 // indirect
114+
golang.org/x/text v0.16.0 // indirect
115+
golang.org/x/tools v0.23.0 // indirect
116116
mvdan.cc/gofumpt v0.6.0 // indirect
117117
)

go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
396396
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
397397
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
398398
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
399-
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
400-
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
399+
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
400+
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
401401
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
402402
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
403403
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -419,8 +419,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
419419
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
420420
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
421421
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
422-
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
423-
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
422+
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
423+
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
424424
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
425425
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
426426
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -474,8 +474,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
474474
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
475475
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
476476
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
477-
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
478-
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
477+
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
478+
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
479479
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
480480
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
481481
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -485,8 +485,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
485485
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
486486
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
487487
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
488-
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
489-
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
488+
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
489+
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
490490
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
491491
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
492492
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -498,8 +498,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
498498
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
499499
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
500500
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
501-
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
502-
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
501+
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
502+
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
503503
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
504504
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
505505
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -531,8 +531,8 @@ golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
531531
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
532532
golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
533533
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
534-
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
535-
golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
534+
golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
535+
golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
536536
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
537537
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
538538
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

pkg/engine/cmd.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"io"
1111
"os"
1212
"os/exec"
13+
"path"
1314
"path/filepath"
1415
"runtime"
1516
"sort"
@@ -262,6 +263,10 @@ func (e *Engine) newCommand(ctx context.Context, extraEnv []string, tool types.T
262263
})
263264
}
264265

266+
if runtime.GOOS == "windows" && (args[0] == "/bin/bash" || args[0] == "/bin/sh") {
267+
args[0] = path.Base(args[0])
268+
}
269+
265270
if runtime.GOOS == "windows" && (args[0] == "/usr/bin/env" || args[0] == "/bin/env") {
266271
args = args[1:]
267272
}

pkg/repos/download/extract.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import (
99
"net/http"
1010
"net/url"
1111
"os"
12+
"path"
1213
"path/filepath"
14+
"strings"
1315
"time"
1416

1517
"github.com/mholt/archiver/v4"
@@ -60,6 +62,18 @@ func Extract(ctx context.Context, downloadURL, digest, targetDir string) error {
6062
return err
6163
}
6264

65+
bin := path.Base(parsedURL.Path)
66+
if strings.HasSuffix(bin, ".exe") {
67+
dst, err := os.Create(filepath.Join(targetDir, bin))
68+
if err != nil {
69+
return err
70+
}
71+
defer dst.Close()
72+
73+
_, err = io.Copy(dst, tmpFile)
74+
return err
75+
}
76+
6377
format, input, err := archiver.Identify(filepath.Base(parsedURL.Path), tmpFile)
6478
if err != nil {
6579
return err

pkg/repos/get.go

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/BurntSushi/locker"
1616
"github.com/gptscript-ai/gptscript/pkg/config"
1717
"github.com/gptscript-ai/gptscript/pkg/credentials"
18+
"github.com/gptscript-ai/gptscript/pkg/hash"
1819
"github.com/gptscript-ai/gptscript/pkg/loader/github"
1920
"github.com/gptscript-ai/gptscript/pkg/repos/git"
2021
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes/golang"
@@ -51,6 +52,7 @@ type Manager struct {
5152
credHelperDirs credentials.CredentialHelperDirs
5253
runtimes []Runtime
5354
credHelperConfig *credHelperConfig
55+
supportLocal bool
5456
}
5557

5658
type credHelperConfig struct {
@@ -60,6 +62,10 @@ type credHelperConfig struct {
6062
env []string
6163
}
6264

65+
func (m *Manager) SetSupportLocal() {
66+
m.supportLocal = true
67+
}
68+
6369
func New(cacheDir string, runtimes ...Runtime) *Manager {
6470
root := filepath.Join(cacheDir, "repos")
6571
return &Manager{
@@ -200,8 +206,14 @@ func (m *Manager) setup(ctx context.Context, runtime Runtime, tool types.Tool, e
200206
_ = os.RemoveAll(doneFile)
201207
_ = os.RemoveAll(target)
202208

203-
if err := git.Checkout(ctx, m.gitDir, tool.Source.Repo.Root, tool.Source.Repo.Revision, target); err != nil {
204-
return "", nil, err
209+
if tool.Source.Repo.VCS == "git" {
210+
if err := git.Checkout(ctx, m.gitDir, tool.Source.Repo.Root, tool.Source.Repo.Revision, target); err != nil {
211+
return "", nil, err
212+
}
213+
} else {
214+
if err := os.MkdirAll(target, 0755); err != nil {
215+
return "", nil, err
216+
}
205217
}
206218

207219
newEnv, err := runtime.Setup(ctx, m.runtimeDir, targetFinal, env)
@@ -227,12 +239,25 @@ func (m *Manager) setup(ctx context.Context, runtime Runtime, tool types.Tool, e
227239
}
228240

229241
func (m *Manager) GetContext(ctx context.Context, tool types.Tool, cmd, env []string) (string, []string, error) {
230-
if tool.Source.Repo == nil {
231-
return tool.WorkingDir, env, nil
232-
}
242+
var isLocal bool
243+
if !m.supportLocal {
244+
if tool.Source.Repo == nil {
245+
return tool.WorkingDir, env, nil
246+
}
233247

234-
if tool.Source.Repo.VCS != "git" {
235-
return "", nil, fmt.Errorf("only git is supported, found VCS %s for %s", tool.Source.Repo.VCS, tool.ID)
248+
if tool.Source.Repo.VCS != "git" {
249+
return "", nil, fmt.Errorf("only git is supported, found VCS %s for %s", tool.Source.Repo.VCS, tool.ID)
250+
}
251+
} else if tool.Source.Repo == nil {
252+
isLocal = true
253+
id := hash.Digest(tool)[:12]
254+
tool.Source.Repo = &types.Repo{
255+
VCS: "<local>",
256+
Root: id,
257+
Path: "/",
258+
Name: id,
259+
Revision: id,
260+
}
236261
}
237262

238263
for _, runtime := range m.runtimes {
@@ -242,5 +267,9 @@ func (m *Manager) GetContext(ctx context.Context, tool types.Tool, cmd, env []st
242267
}
243268
}
244269

270+
if isLocal {
271+
return tool.WorkingDir, env, nil
272+
}
273+
245274
return m.setup(ctx, &noopRuntime{}, tool, env)
246275
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6d2dfd1c1412c3550a89071a1b36a6f6073844320e687343d1dfc72719ecb8d9 FRP-5301-gda71f7c57/busybox-w64-FRP-5301-gda71f7c57.exe

pkg/repos/runtimes/busybox/busybox.go

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
package busybox
2+
3+
import (
4+
"bufio"
5+
"bytes"
6+
"context"
7+
_ "embed"
8+
"errors"
9+
"fmt"
10+
"io/fs"
11+
"os"
12+
"os/exec"
13+
"path"
14+
"path/filepath"
15+
"runtime"
16+
"strings"
17+
18+
runtimeEnv "github.com/gptscript-ai/gptscript/pkg/env"
19+
"github.com/gptscript-ai/gptscript/pkg/hash"
20+
"github.com/gptscript-ai/gptscript/pkg/repos/download"
21+
)
22+
23+
//go:embed SHASUMS256.txt
24+
var releasesData []byte
25+
26+
const downloadURL = "https://github.com/gptscript-ai/busybox-w32/releases/download/%s"
27+
28+
type Runtime struct {
29+
}
30+
31+
func (r *Runtime) ID() string {
32+
return "busybox"
33+
}
34+
35+
func (r *Runtime) Supports(cmd []string) bool {
36+
if runtime.GOOS != "windows" {
37+
return false
38+
}
39+
for _, bin := range []string{"bash", "sh", "/bin/sh", "/bin/bash"} {
40+
if runtimeEnv.Matches(cmd, bin) {
41+
return true
42+
}
43+
}
44+
return false
45+
}
46+
47+
func (r *Runtime) Setup(ctx context.Context, dataRoot, _ string, env []string) ([]string, error) {
48+
binPath, err := r.getRuntime(ctx, dataRoot)
49+
if err != nil {
50+
return nil, err
51+
}
52+
53+
newEnv := runtimeEnv.AppendPath(env, binPath)
54+
return newEnv, nil
55+
}
56+
57+
func (r *Runtime) getReleaseAndDigest() (string, string, error) {
58+
scanner := bufio.NewScanner(bytes.NewReader(releasesData))
59+
for scanner.Scan() {
60+
line := scanner.Text()
61+
fields := strings.Fields(line)
62+
return fmt.Sprintf(downloadURL, fields[1]), fields[0], nil
63+
}
64+
65+
return "", "", fmt.Errorf("failed to find %s release", r.ID())
66+
}
67+
68+
func (r *Runtime) getRuntime(ctx context.Context, cwd string) (string, error) {
69+
url, sha, err := r.getReleaseAndDigest()
70+
if err != nil {
71+
return "", err
72+
}
73+
74+
target := filepath.Join(cwd, "busybox", hash.ID(url, sha))
75+
if _, err := os.Stat(target); err == nil {
76+
return target, nil
77+
} else if !errors.Is(err, fs.ErrNotExist) {
78+
return "", err
79+
}
80+
81+
log.Infof("Downloading Busybox")
82+
tmp := target + ".download"
83+
defer os.RemoveAll(tmp)
84+
85+
if err := os.MkdirAll(tmp, 0755); err != nil {
86+
return "", err
87+
}
88+
89+
if err := download.Extract(ctx, url, sha, tmp); err != nil {
90+
return "", err
91+
}
92+
93+
bbExe := filepath.Join(tmp, path.Base(url))
94+
95+
cmd := exec.Command(bbExe, "--install", ".")
96+
cmd.Dir = filepath.Dir(bbExe)
97+
98+
if err := cmd.Run(); err != nil {
99+
return "", err
100+
}
101+
102+
if err := os.Rename(tmp, target); err != nil {
103+
return "", err
104+
}
105+
106+
return target, nil
107+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package busybox
2+
3+
import (
4+
"context"
5+
"errors"
6+
"io/fs"
7+
"os"
8+
"path/filepath"
9+
"runtime"
10+
"strings"
11+
"testing"
12+
13+
"github.com/adrg/xdg"
14+
"github.com/samber/lo"
15+
"github.com/stretchr/testify/require"
16+
)
17+
18+
var (
19+
testCacheHome = lo.Must(xdg.CacheFile("gptscript-test-cache/runtime"))
20+
)
21+
22+
func firstPath(s []string) string {
23+
_, p, _ := strings.Cut(s[0], "=")
24+
return strings.Split(p, string(os.PathListSeparator))[0]
25+
}
26+
27+
func TestRuntime(t *testing.T) {
28+
if runtime.GOOS != "windows" {
29+
t.Skip()
30+
}
31+
32+
r := Runtime{}
33+
34+
s, err := r.Setup(context.Background(), testCacheHome, "testdata", os.Environ())
35+
require.NoError(t, err)
36+
_, err = os.Stat(filepath.Join(firstPath(s), "busybox.exe"))
37+
if errors.Is(err, fs.ErrNotExist) {
38+
_, err = os.Stat(filepath.Join(firstPath(s), "busybox"))
39+
}
40+
require.NoError(t, err)
41+
}

pkg/repos/runtimes/busybox/log.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package busybox
2+
3+
import "github.com/gptscript-ai/gptscript/pkg/mvl"
4+
5+
var log = mvl.Package()

pkg/repos/runtimes/default.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ package runtimes
33
import (
44
"github.com/gptscript-ai/gptscript/pkg/engine"
55
"github.com/gptscript-ai/gptscript/pkg/repos"
6+
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes/busybox"
67
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes/golang"
78
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes/node"
89
"github.com/gptscript-ai/gptscript/pkg/repos/runtimes/python"
910
)
1011

1112
var Runtimes = []repos.Runtime{
13+
&busybox.Runtime{},
1214
&python.Runtime{
1315
Version: "3.12",
1416
Default: true,

0 commit comments

Comments
 (0)