Another question unrelated to the above Is there a...
# plugins
h
Another question unrelated to the above Is there a way to run a goal from another goal? Specifically, I'm looking at conditionally (re-)generating a lockfile as part of another plugin
c
Usually you don't want to run the goal itself, since there's some wrapping to handle argument resolution and helpful errors. Inside of the goal rule, there's usually a call that does what you actually want. For example, if you want to run the
package
goal, you'd request
Get(BuiltPackage, EnvironmentAwarePackageRequest(...))
. Here's an example of a plugin that does that https://gist.github.com/lilatomic/bc2d63dc5c6f1a517aa5f8dc42596ab1#file-register-py-L74-L77
h
Thanks! I'll take a look 🙂