Skip to content

Commit 2506ede

Browse files
authored
feat: bump fish to the official release version (#2000)
Signed-off-by: Keming <kemingyang@tensorchord.ai>
1 parent dd3eeca commit 2506ede

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/lang/ir/v1/shell.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package v1
1616

1717
import (
18+
"fmt"
19+
1820
"github.com/cockroachdb/errors"
1921
"github.com/moby/buildkit/client/llb"
2022

@@ -54,7 +56,8 @@ renamed = "r"
5456
deleted = "x"
5557
`
5658

57-
fishVersion = "4.0b1"
59+
fishVersion = "4.0.1"
60+
fishAssetURL = "https://github.com/fish-shell/fish-shell/releases/download/%[1]s/fish-static-$(uname -m)-%[1]s.tar.xz"
5861
)
5962

6063
func (g *generalGraph) compileShell(root llb.State) (_ llb.State, err error) {
@@ -142,14 +145,15 @@ func (g generalGraph) compileZSH(root llb.State) (llb.State, error) {
142145

143146
func (g generalGraph) compileFish(root llb.State) llb.State {
144147
base := llb.Image(builderImage)
148+
url := fmt.Sprintf(fishAssetURL, fishVersion)
145149
builder := base.Run(
146-
llb.Shlexf(`sh -c "wget -qO- https://github.com/fish-shell/fish-shell/releases/download/%s/fish-static-linux-$(uname -m).tar.xz | tar -xJf - -C /tmp || exit 1"`, fishVersion),
150+
llb.Shlexf(`sh -c "wget -qO- %s | tar -xJf - -C /tmp || exit 1"`, url),
147151
llb.WithCustomName("[internal] download fish shell"),
148152
).Root()
149153
root = root.File(
150154
llb.Copy(builder, "/tmp/fish", "/usr/bin/fish"),
151155
llb.WithCustomName("[internal] copy fish shell from the builder image")).
152-
Run(llb.Shlex("fish --install"),
156+
Run(llb.Shlex(`sh -c "echo yes | fish --install"`),
153157
llb.WithCustomName("[internal] install fish shell")).Root()
154158

155159
return root

0 commit comments

Comments
 (0)