mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Clearer error message in the client when DOCKER env variable is not set
This commit is contained in:
parent
63ce08107e
commit
edc9968604
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"os"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
||||
|
@ -160,6 +161,10 @@ func Fatal(err error) {
|
|||
|
||||
func main() {
|
||||
var err error
|
||||
if os.Getenv("DOCKER") == "" {
|
||||
fmt.Printf("Can't connect. Please set environment variable DOCKER to ip:port, eg. 'localhost:4242'.\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
if IsTerminal(0) && os.Getenv("NORAW") == "" {
|
||||
oldState, err = MakeRaw(0)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue