1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

Merge pull request #3120 from daehyeok/Driver_env

DRIVER environment variable
This commit is contained in:
David Gageot
2016-03-04 07:29:26 +01:00

View File

@@ -40,7 +40,8 @@ var (
Usage: fmt.Sprintf(
"Driver to create machine with.",
),
Value: "none",
Value: "none",
EnvVar: "MACHINE_DRIVER",
},
cli.StringFlag{
Name: "engine-install-url",
@@ -290,8 +291,12 @@ func cmdCreateOuter(c CommandLine, api libmachine.API) error {
// We didn't recognize the driver name.
driverName := flagHackLookup("--driver")
if driverName == "" {
c.ShowHelp()
return nil // ?
//TODO: Check Environment have to include flagHackLookup function.
driverName = os.Getenv("MACHINE_DRIVER")
if driverName == "" {
c.ShowHelp()
return nil // ?
}
}
// TODO: Fix hacky JSON solution