Add general inventory interface implementation

This commit also adds function to be used with command line pkg

Change-Id: Ifdebfd62817b071f06cad90a14897fda63808a7a
This commit is contained in:
Kostiantyn Kalynovskyi
2021-01-21 23:18:55 +00:00
parent decc12b0a9
commit 8958d7093c
11 changed files with 463 additions and 18 deletions

View File

@@ -322,7 +322,12 @@ func (c *Config) CurrentContextManifest() (*Manifest, error) {
return nil, err
}
return c.Manifests[currentContext.Manifest], nil
manifest, exist := c.Manifests[currentContext.Manifest]
if !exist {
return nil, ErrMissingConfig{What: "manifest named " + currentContext.Manifest}
}
return manifest, nil
}
// CurrentContextTargetPath returns target path from current context's manifest