diff --git a/cmd/builder/runtime.go b/cmd/builder/runtime.go index a3f5276..df1dc28 100644 --- a/cmd/builder/runtime.go +++ b/cmd/builder/runtime.go @@ -21,6 +21,9 @@ func NewRuntimeCmd(o *RuntimeOptions) *cobra.Command { Use: "runtime", Short: "Build runtime image for MetaCall", RunE: func(cmd *cobra.Command, args []string) error { + if o.RuntimeImageFlags.MetacallCli { + args = append(args,"node") + } base := cmd.Context().Value(baseKey{}).(llb.State) devBase := staging.RemoveBuild(staging.DevBase(base, branch, []string{})) devBaseLang := staging.RemoveBuild(staging.DevBase(base, branch, args)) @@ -30,7 +33,7 @@ func NewRuntimeCmd(o *RuntimeOptions) *cobra.Command { runtime := llb.Merge([]llb.State{runtimeBase, diffed}) if o.RuntimeImageFlags.MetacallCli { - runtime = staging.AddCli(devBase, runtime) + runtime = staging.AddCli(devBaseLang, runtime) } runtime, err := o.Run(runtime) diff --git a/pkg/staging/deps.go b/pkg/staging/deps.go index d59d382..9c9fb81 100644 --- a/pkg/staging/deps.go +++ b/pkg/staging/deps.go @@ -81,7 +81,7 @@ func RuntimeBase(base llb.State, branch string, args []string) llb.State { } func AddCli(src llb.State, dst llb.State) llb.State { - return dst.With(copyFrom(src, "/usr/local/bin/metacallcli*", "/usr/local/bin/metacall")) + return dst.With(copyFrom(src, "/usr/local/bin/metacallcli*", "/usr/local/bin/metacallcli")) } func RemoveBuild(state llb.State) llb.State { diff --git a/test/test.sh b/test/test.sh index 1ec873a..25ba921 100755 --- a/test/test.sh +++ b/test/test.sh @@ -23,7 +23,7 @@ test() { while [ ! "$(docker inspect --format '{{json .State.Health.Status }}' metacall_builder_registry)" = "\"healthy\"" ]; do sleep 5 done - docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli $1" | grep "$2" + docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli $1" ${DOCKER_CMD} down }