forked from toolshed/abra
		
	fix: retain backwards compat with TYPE/RECIPE change
This commit is contained in:
		| @ -124,7 +124,10 @@ func newApp(env AppEnv, name string, appFile AppFile) (App, error) { | ||||
|  | ||||
| 	recipe, exists := env["RECIPE"] | ||||
| 	if !exists { | ||||
| 		return App{}, fmt.Errorf("%s is missing the RECIPE env var", name) | ||||
| 		recipe, exists = env["TYPE"] | ||||
| 		if !exists { | ||||
| 			return App{}, fmt.Errorf("%s is missing the RECIPE env var", name) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	return App{ | ||||
|  | ||||
| @ -35,16 +35,21 @@ func LoadComposefile(opts Deploy, appEnv map[string]string) (*composetypes.Confi | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	recipeName, exists := appEnv["RECIPE"] | ||||
| 	if !exists { | ||||
| 		recipeName, _ = appEnv["TYPE"] | ||||
| 	} | ||||
|  | ||||
| 	unsupportedProperties := loader.GetUnsupportedProperties(dicts...) | ||||
| 	if len(unsupportedProperties) > 0 { | ||||
| 		logrus.Warnf("%s: ignoring unsupported options: %s", | ||||
| 			appEnv["RECIPE"], strings.Join(unsupportedProperties, ", ")) | ||||
| 			recipeName, strings.Join(unsupportedProperties, ", ")) | ||||
| 	} | ||||
|  | ||||
| 	deprecatedProperties := loader.GetDeprecatedProperties(dicts...) | ||||
| 	if len(deprecatedProperties) > 0 { | ||||
| 		logrus.Warnf("%s: ignoring deprecated options: %s", | ||||
| 			appEnv["RECIPE"], propertyWarnings(deprecatedProperties)) | ||||
| 			recipeName, propertyWarnings(deprecatedProperties)) | ||||
| 	} | ||||
| 	return config, nil | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user