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

Commit

Permalink
Merge pull request #366 from lalyos/add-checkEnvironment-into-shellinit
Browse files Browse the repository at this point in the history
Add checkEnvironment call into cmdHellInit before printExport.
  • Loading branch information
gmlewis committed May 18, 2015
2 parents cb2c3bc + bcd1a9d commit 17e0cec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,13 @@ func cmdShellInit() error {
// These errors are not fatal
fmt.Fprintf(os.Stderr, "Warning: error copying certificates: %s\n", err)
}
printExport(socket, certPath)

// Check if $DOCKER_* ENV vars are properly configured.
if !checkEnvironment(socket, certPath) {
printExport(socket, certPath)
} else {
fmt.Fprintf(os.Stderr, "Your environment variables are already set correctly.\n")
}

return nil
}
Expand Down

0 comments on commit 17e0cec

Please sign in to comment.