@@ -40,7 +40,7 @@ func cmdUp() error {
4040 return fmt .Errorf ("Failed to start machine %q (run again with -v for details)" , B2D .VM )
4141 }
4242
43- fmt .Printf ("Waiting for VM to be started..." )
43+ fmt .Println ("Waiting for VM to be started..." )
4444 //give the VM a little time to start, so we don't kill the Serial Pipe/Socket
4545 time .Sleep (600 * time .Millisecond )
4646 natSSH := fmt .Sprintf ("localhost:%d" , m .GetSSHPort ())
@@ -70,7 +70,11 @@ func cmdUp() error {
7070 IP = RequestIPFromSSH (m )
7171 }
7272 // Copying the certs here - someone might have have written a Windows API client.
73- certPath := RequestCertsUsingSSH (m )
73+ certPath , err := RequestCertsUsingSSH (m )
74+ if err != nil && B2D .Verbose {
75+ // These errors are not fatal
76+ fmt .Printf ("Error copying Certificates: %s\n " , err )
77+ }
7478 switch runtime .GOOS {
7579 case "windows" :
7680 fmt .Printf ("Docker client does not run on Windows for now. Please use\n " )
@@ -86,8 +90,14 @@ func cmdUp() error {
8690 if os .Getenv ("DOCKER_HOST" ) != socket || os .Getenv ("DOCKER_CERT_PATH" ) != certPath {
8791 fmt .Printf ("\n To connect the Docker client to the Docker daemon, please set:\n " )
8892 fmt .Printf (" export DOCKER_HOST=%s\n " , socket )
89- // Assume Docker 1.2.0 with TLS on...
90- fmt .Printf (" export DOCKER_CERT_PATH=%s\n " , certPath )
93+ if certPath == "" {
94+ if os .Getenv ("DOCKER_CERT_PATH" ) != "" {
95+ fmt .Println (" unset DOCKER_CERT_PATH" )
96+ }
97+ } else {
98+ // Assume Docker 1.2.0 with TLS on...
99+ fmt .Printf (" export DOCKER_CERT_PATH=%s\n " , certPath )
100+ }
91101 } else {
92102 fmt .Printf ("Your DOCKER_HOST env variable is already set correctly.\n " )
93103 }
@@ -104,7 +114,7 @@ func cmdConfig() error {
104114 return fmt .Errorf ("Error working out Profile file location: %s" , err )
105115 }
106116 filename := cfgFilename (dir )
107- fmt .Printf ("boot2docker profile filename: %s" , filename )
117+ fmt .Printf ("boot2docker profile filename: %s\n " , filename )
108118 fmt .Println (printConfig ())
109119 return nil
110120}
@@ -304,18 +314,18 @@ func cmdIP() error {
304314
305315// Download the boot2docker ISO image.
306316func cmdDownload () error {
307- fmt .Printf ("Downloading boot2docker ISO image..." )
317+ fmt .Println ("Downloading boot2docker ISO image..." )
308318 url := "https://api.github.com/repos/boot2docker/boot2docker/releases"
309319 tag , err := getLatestReleaseName (url )
310320 if err != nil {
311321 return fmt .Errorf ("Failed to get latest release: %s" , err )
312322 }
313- fmt .Printf ("Latest release is %s" , tag )
323+ fmt .Printf ("Latest release is %s\n " , tag )
314324
315325 url = fmt .Sprintf ("https://github.com/boot2docker/boot2docker/releases/download/%s/boot2docker.iso" , tag )
316326 if err := download (B2D .ISO , url ); err != nil {
317327 return fmt .Errorf ("Failed to download ISO image: %s" , err )
318328 }
319- fmt .Printf ("Success: downloaded %s\n \t to %s" , url , B2D .ISO )
329+ fmt .Printf ("Success: downloaded %s\n \t to %s\n " , url , B2D .ISO )
320330 return nil
321331}
0 commit comments