pulumi/pkg/resource/plugin
Justin Van Patten 3c1bdff5fd
Allow relative paths to `--policy-pack` (#3565)
A regression was introduced when we added support for non-Node.js Pulumi programs to run Policy Packs. With that change, we now pass the Policy Pack's full path as the plugin's pwd (so that it would load the `@pulumi/pulumi/cmd/run-policy-pack` Node module from the Policy Pack's node_modules rather than the program's node_modules), but we also pass the path to the policy pack as well. If the path is a full rooted path, this would work fine, and that's what our tests do. However, if a relative path is specified, then it will be looking to load the Policy Pack relative to the pwd, which doesn't produce a correct path leading to failures trying to load the Policy Pack.

Since the pwd is the policy pack path, we can simply pass the path as `"."` to the analyzer plugin, and it will load the policy pack in its pwd.
2019-11-22 17:24:35 +00:00
..
analyzer.go Send resource URN and name to analyzer (#3554) 2019-11-21 21:01:15 +00:00
analyzer_plugin.go Allow relative paths to `--policy-pack` (#3565) 2019-11-22 17:24:35 +00:00
check.go Add license headers 2018-05-22 15:02:47 -07:00
config_source.go Add license headers 2018-05-22 15:02:47 -07:00
context.go Remove uses of plugins in the snapshot (#2662) 2019-04-23 09:53:44 -07:00
host.go Implement `--policy-pack` flag on `up` and `preview` 2019-08-12 12:45:48 -07:00
host_server.go Improve tracing support. (#3238) 2019-09-16 14:16:43 -07:00
langruntime.go Add nodejs support for query mode 2019-05-02 18:08:08 -07:00
langruntime_plugin.go Enable policies to run for all languages (#3524) 2019-11-18 18:29:12 +00:00
plugin.go Provide a more helpful PaC error (#3525) 2019-11-19 18:47:47 +00:00
provider.go Implement `StreamInvoke` 2019-11-05 10:47:48 -08:00
provider_plugin.go Enable policies to run for all languages (#3524) 2019-11-18 18:29:12 +00:00
provider_plugin_test.go Fix up some spelling errors 2019-06-18 15:30:25 -07:00
rpc.go Introduce MarshalOptions.{RejectAsset, RejectArchive} 2019-08-26 15:19:14 -07:00
rpc_test.go Introduce MarshalOptions.{RejectAsset, RejectArchive} 2019-08-26 15:19:14 -07:00