diff --git a/internal/resource/package.go b/internal/resource/package.go index 35a576c..5b6c7e9 100644 --- a/internal/resource/package.go +++ b/internal/resource/package.go @@ -132,8 +132,8 @@ func (p *Package) Apply() error { return err } - p.Read(context.Background()) - return nil + _,e := p.Read(context.Background()) + return e } func (p *Package) Load(r io.Reader) error { @@ -161,7 +161,7 @@ func (p *Package) Read(ctx context.Context) ([]byte, error) { } func (p *Package) UnmarshalJSON(data []byte) error { - if unmarshalErr := json.Unmarshal(data, *p); unmarshalErr != nil { + if unmarshalErr := json.Unmarshal(data, p); unmarshalErr != nil { return unmarshalErr } p.CreateCommand, p.ReadCommand, p.UpdateCommand, p.DeleteCommand = p.PackageType.NewCRUD()