Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 47f3dcf

Browse files
committed
Added consistency in build
this commit will fix #449 by showing same build context when it is mentioned either as a string containing a path to the build context, or an object with the path specified under context. Signed-off-by: Suraj Narwade <[email protected]>
1 parent 8e4221d commit 47f3dcf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

config/merge_v2.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,13 @@ func resolveContextV2(inFile string, serviceData RawService) RawService {
180180
} else {
181181
current = path.Join(current, context)
182182
}
183-
184-
build["context"] = current
183+
if _, ok := serviceData["build"].(string); ok {
184+
//build is specified as a string containing a path to the build context
185+
serviceData["build"] = current
186+
} else {
187+
//build is specified as an object with the path specified under context
188+
build["context"] = current
189+
}
185190

186191
return serviceData
187192
}

0 commit comments

Comments
 (0)