Check if local exports exist (#197)
Check if local exports exist during diffing. For tar, the file must exist. For local, the directory must exist and be populated. Fixes https://github.com/pulumi/pulumi-docker-build/issues/177.
This commit is contained in:
@@ -913,6 +913,12 @@ func (*Image) Diff(
|
||||
if fmt.Sprint(olds.Exports) != fmt.Sprint(news.Exports) {
|
||||
diff["exports"] = update
|
||||
}
|
||||
// Confirm local exports exist.
|
||||
for idx, e := range news.Exports {
|
||||
if !e.Local.Exists() || !e.Tar.Exists() {
|
||||
diff[fmt.Sprintf("exports[%d]", idx)] = update
|
||||
}
|
||||
}
|
||||
if !reflect.DeepEqual(olds.Labels, news.Labels) {
|
||||
diff["labels"] = update
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user