Add NU_VERSION environment variable on startup (#10177)

This commit is contained in:
Jakub Žádník 2023-09-01 09:48:13 +03:00 committed by GitHub
parent f35808cb89
commit d28f728787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)?;
}