Allow project to be nil when namespacing project stack config
@@ -143,6 +143,7 @@ type projectStackLoader struct {
// Rewrite config values to make them namespaced. Using the project name as the default namespace
// for example:
+//
// config:
// instanceSize: t3.micro
//
@@ -151,6 +152,11 @@ type projectStackLoader struct {
// config:
// {projectName}:instanceSize:t3.micro
func stackConfigNamespacedWithProject(project *Project, projectStack map[string]interface{}) map[string]interface{} {
+ if project == nil {
+ // return the original config if we don't have a project
+ return projectStack
+ }
+
config, ok := projectStack["config"]
if ok {
configAsMap, isMap := config.(map[string]interface{})
