Skip to content

Commit

Permalink
Fix environment engine api key var (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceMacD authored Oct 6, 2021
1 parent 400ead9 commit bbc6681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func newEngineCmd() (*cobra.Command, error) {
return errors.New("registry not specified (--registry or INFRA_ENGINE_REGISTRY)")
}
if options.Registry != "infra" && options.APIKey == "" {
return errors.New("api-key not specified (--api-key or INFRA_ENGINE_API_KEY)")
return errors.New("api-key not specified (--api-key or ENGINE_API_KEY)")
}
return engine.Run(options)
},
Expand All @@ -304,7 +304,7 @@ func newEngineCmd() (*cobra.Command, error) {
cmd.Flags().StringVarP(&options.Registry, "registry", "r", os.Getenv("INFRA_ENGINE_REGISTRY"), "registry hostname")
cmd.Flags().StringVarP(&options.Name, "name", "n", os.Getenv("INFRA_ENGINE_NAME"), "cluster name")
cmd.Flags().StringVar(&options.TLSCache, "tls-cache", filepath.Join(defaultInfraHome, "cache"), "path to directory to cache tls self-signed and Let's Encrypt certificates")
cmd.Flags().StringVar(&options.APIKey, "api-key", os.Getenv("INFRA_ENGINE_API_KEY"), "api key")
cmd.Flags().StringVar(&options.APIKey, "api-key", os.Getenv("ENGINE_API_KEY"), "api key")

if filepath.Dir(options.TLSCache) == defaultInfraHome {
homeDir, err := os.UserHomeDir()
Expand Down

0 comments on commit bbc6681

Please sign in to comment.