zed: Clear the FORCE_CLI_MODE environment variable after reading (#46475)
Josh Robson Chase
created
This prevents child processes (e.g. shells) from inheriting it. This
generally isn't an issue, since zed is the only thing that cares about
it, but if you're trying to run zed *from* zed, you would first need to
unset it manually.
Release Notes:
- N/A
@@ -34,4 +34,7 @@ pub enum CliResponse {
/// When Zed started not as an *.app but as a binary (e.g. local development),
/// there's a possibility to tell it to behave "regularly".
+///
+/// Note that in the main zed binary, this variable is unset after it's read for the first time,
+/// therefore it should always be accessed through the `FORCE_CLI_MODE` static.
pub const FORCE_CLI_MODE_ENV_VAR_NAME: &str = "ZED_FORCE_CLI_MODE";