feat(bash): set `CRUSH=1`, `AGENT=crush` and `AI_AGENT=crush` (#2484)
Andrey Nering
created
These ENVs can be used by tools to detect if they are being executed
by Crush, via the Bash tool.
Change summary
internal/shell/shell.go | 8 ++++++++
1 file changed, 8 insertions(+)
Detailed changes
@@ -82,6 +82,14 @@ func NewShell(opts *Options) *Shell {
env = os.Environ()
}
+ // Allow tools to detect execution by Crush.
+ env = append(
+ env,
+ "CRUSH=1",
+ "AGENT=crush",
+ "AI_AGENT=crush",
+ )
+
logger := opts.Logger
if logger == nil {
logger = noopLogger{}