File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 15
15
package v1
16
16
17
17
import (
18
+ "fmt"
19
+
18
20
"github.com/cockroachdb/errors"
19
21
"github.com/moby/buildkit/client/llb"
20
22
@@ -54,7 +56,8 @@ renamed = "r"
54
56
deleted = "x"
55
57
`
56
58
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"
58
61
)
59
62
60
63
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) {
142
145
143
146
func (g generalGraph ) compileFish (root llb.State ) llb.State {
144
147
base := llb .Image (builderImage )
148
+ url := fmt .Sprintf (fishAssetURL , fishVersion )
145
149
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 ),
147
151
llb .WithCustomName ("[internal] download fish shell" ),
148
152
).Root ()
149
153
root = root .File (
150
154
llb .Copy (builder , "/tmp/fish" , "/usr/bin/fish" ),
151
155
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"` ),
153
157
llb .WithCustomName ("[internal] install fish shell" )).Root ()
154
158
155
159
return root
You can’t perform that action at this time.
0 commit comments