diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-06-13 16:33:41 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-06-14 09:47:41 +0200 |
commit | 66da1b7b2f8a8bd26ed4a50a54f64489f116f484 (patch) | |
tree | b1325453b318e00022ff445fedf0f0adb08f678e /resources | |
parent | 5a9ecb82a39886a7241ec656fc980f20c1b8dd1c (diff) |
resources: Panic on Copy of Resource with .Err
Fixes #10006
Diffstat (limited to 'resources')
-rw-r--r-- | resources/resource.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/resources/resource.go b/resources/resource.go index 5773977a2..fd60fd4f6 100644 --- a/resources/resource.go +++ b/resources/resource.go @@ -128,6 +128,9 @@ type resourceCopier interface { // Copy copies r to the targetPath given. func Copy(r resource.Resource, targetPath string) resource.Resource { + if r.Err() != nil { + panic(fmt.Sprintf("Resource has an .Err: %s", r.Err())) + } return r.(resourceCopier).cloneTo(targetPath) } |