Handle deploy correctly for local files vs. templates

pull/187/head
vaikas-google 9 years ago
parent 58377e4c5b
commit f632036e9e

@ -375,14 +375,16 @@ func loadTemplate(args []string) *common.Template {
}
}
} else {
if len(args) < 3 {
// See if the first argument is a local file. It could either be a type, or it could be a configuration. If
// it's a local file, it's configuration.
if _, err := os.Stat(args[1]); err == nil {
template, err = expander.NewTemplateFromFileNames(args[1], args[2:])
} else {
if t, err := registry.ParseType(args[1]); err == nil {
template = buildTemplateFromType(t)
} else {
template, err = expander.NewTemplateFromRootTemplate(args[1])
}
} else {
template, err = expander.NewTemplateFromFileNames(args[1], args[2:])
}
if err != nil {

Loading…
Cancel
Save