From d28f728787897bd8656b3e829e02a6d2540ba5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Fri, 1 Sep 2023 09:48:13 +0300 Subject: [PATCH] Add NU_VERSION environment variable on startup (#10177) --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 9b146ed036..238c0b768b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -185,6 +185,11 @@ fn main() -> Result<()> { use_color, ); + engine_state.add_env_var( + "NU_VERSION".to_string(), + Value::string(env!("CARGO_PKG_VERSION"), Span::unknown()), + ); + if parsed_nu_cli_args.no_std_lib.is_none() { load_standard_library(&mut engine_state)?; }