choria-io / mcorpc-ruby-support

Support libraries to enable Ruby agents and clients to communicate with the Choria Server
https://choria.io/
Apache License 2.0
1 stars 8 forks source link

(#151) Set the environment variable PT__task #152

Closed smortex closed 3 years ago

smortex commented 3 years ago

When running a task, Bolt sets the name of that task in the PR__task environment variable. Commands run by Bolt can use this variable to determine if running in the context of a Bolt task or not.

Also set this variable when running through choria so that code that wants to behave differently when running from a Bolt task can go through the same path when executed by the choria tasks support without needing modification.

Fixes #151

ripienaar commented 3 years ago

thank you