diff options
Diffstat (limited to 'src/app/api/plugins/panes.rs')
| -rw-r--r-- | src/app/api/plugins/panes.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/app/api/plugins/panes.rs b/src/app/api/plugins/panes.rs index 22173cbf..e6fe7b44 100644 --- a/src/app/api/plugins/panes.rs +++ b/src/app/api/plugins/panes.rs @@ -185,6 +185,11 @@ impl App { .map_err(|err| ("invalid_plugin_context".to_string(), err.to_string()))?; env.retain(|(key, _)| !plugin_pane_protected_env_key(key)); env.extend(super::env::plugin_path_env(plugin)); + env.push(( + crate::api::SOCKET_PATH_ENV_VAR.to_string(), + crate::api::socket_path().display().to_string(), + )); + env.push(("HERDR_ENV".to_string(), "1".to_string())); env.push(("HERDR_PLUGIN_ID".to_string(), plugin.plugin_id.clone())); env.push(( "HERDR_PLUGIN_ENTRYPOINT_ID".to_string(), @@ -273,7 +278,9 @@ impl App { fn plugin_pane_protected_env_key(key: &str) -> bool { matches!( key, - "HERDR_PLUGIN_ID" + crate::api::SOCKET_PATH_ENV_VAR + | "HERDR_ENV" + | "HERDR_PLUGIN_ID" | "HERDR_PLUGIN_ROOT" | "HERDR_PLUGIN_CONFIG_DIR" | "HERDR_PLUGIN_STATE_DIR" |
