add ability to skip installation (npm, pip) step when installing plugins

This commit is contained in:
evanboyle 2021-06-01 13:47:56 -07:00
parent 9c1964e622
commit 3f97351692
2 changed files with 3 additions and 1 deletions

View file

@ -374,7 +374,7 @@ func (info PluginInfo) Install(tgz io.ReadCloser) error {
if err != nil && !os.IsNotExist(err) {
return errors.Wrap(err, "loading PulumiPlugin.yaml")
}
if proj != nil {
if proj != nil && !proj.SkipInstall {
runtime := strings.ToLower(proj.Runtime.Name())
// For now, we only do this for Node.js and Python. For Go, the expectation is the binary is
// already built. For .NET, similarly, a single self-contained binary could be used, but

View file

@ -157,6 +157,8 @@ func (proj *PolicyPackProject) Save(path string) error {
type PluginProject struct {
// Runtime is a required runtime that executes code.
Runtime ProjectRuntimeInfo `json:"runtime" yaml:"runtime"`
// skips installation of runtime depenencies
SkipInstall bool `json:"skipInstall" yaml:"skipInstall"`
}
func (proj *PluginProject) Validate() error {