File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 7
7
"io"
8
8
"os"
9
9
"path/filepath"
10
+ "strings"
10
11
12
+ eboptions "github.com/coder/envbuilder/options"
11
13
"github.com/google/go-containerregistry/pkg/authn"
12
14
"github.com/google/go-containerregistry/pkg/name"
13
15
v1 "github.com/google/go-containerregistry/pkg/v1"
@@ -33,7 +35,9 @@ func GetRemoteImage(imgRef string) (v1.Image, error) {
33
35
// ExtractEnvbuilderFromImage reads the image located at imgRef and extracts
34
36
// MagicBinaryLocation to destPath.
35
37
func ExtractEnvbuilderFromImage (ctx context.Context , imgRef , destPath string ) error {
36
- needle := ".envbuilder/bin/envbuilder"
38
+ var o eboptions.Options
39
+ o .SetDefaults ()
40
+ needle := strings .TrimPrefix (o .BinaryPath , "/" )
37
41
img , err := GetRemoteImage (imgRef )
38
42
if err != nil {
39
43
return fmt .Errorf ("check remote image: %w" , err )
You can’t perform that action at this time.
0 commit comments