Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit 8aedb4a

Browse files
committed
Merge pull request #289 from boot2docker/revert-283-boot2docker.iso
Revert "Update default ISO path to prefer an ISO that's next to the boot...
2 parents b9082bc + a8ca6ec commit 8aedb4a

1 file changed

Lines changed: 1 addition & 32 deletions

File tree

config.go

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"net"
77
"os"
8-
"os/exec"
98
"path/filepath"
109
"regexp"
1110
"runtime"
@@ -62,36 +61,6 @@ func cfgFilename(dir string) string {
6261
return filename
6362
}
6463

65-
func defaultIsoPath(dir string) string {
66-
var err error
67-
68-
iso := filepath.Join(dir, "boot2docker.iso")
69-
70-
exe := os.Args[0]
71-
if filepath.Base(exe) == exe {
72-
// this logic borrowed from reexec/reexec.go in Docker itself :)
73-
if lp, err := exec.LookPath(exe); err == nil {
74-
exe = lp
75-
}
76-
}
77-
78-
if exe, err = filepath.Abs(exe); err != nil {
79-
return iso
80-
}
81-
82-
if exe, err = filepath.EvalSymlinks(exe); err != nil {
83-
return iso
84-
}
85-
86-
// if there's a "boot2docker.iso" next to our boot2docker-cli executable, let's prefer that one by default
87-
exeIso := filepath.Join(filepath.Dir(exe), "boot2docker.iso")
88-
if _, err = os.Stat(exeIso); err == nil {
89-
return exeIso
90-
}
91-
92-
return iso
93-
}
94-
9564
// Write configuration set by the combination of profile and flags
9665
// Should result in a format that can be piped into a profile file
9766
func printConfig() string {
@@ -123,7 +92,7 @@ func config() (*flag.FlagSet, error) {
12392
//flags.StringVarP(&B2D.Dir, "dir", "d", dir, "boot2docker config directory.")
12493
B2D.Dir = dir
12594
flags.StringVar(&B2D.ISOURL, "iso-url", "https://api.github.com/repos/boot2docker/boot2docker/releases", "source URL to provision the boot2docker ISO image.")
126-
flags.StringVar(&B2D.ISO, "iso", defaultIsoPath(dir), "path to boot2docker ISO image.")
95+
flags.StringVar(&B2D.ISO, "iso", filepath.Join(dir, "boot2docker.iso"), "path to boot2docker ISO image.")
12796

12897
// Sven disabled this, as it is broken - if I user with a fresh computer downloads
12998
// just the boot2docker-cli, and then runs `boot2docker --init ip`, we create a vm

0 commit comments

Comments
 (0)