mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:55:59 +02:00
Reduce duplicate dependencies on the windows
crate (#14105)
Nushell currently depends on three different versions of the `windows` crate: `0.44.0`, `0.52.0`, and `0.54.0`. This PR bumps several dependencies so that the `nu` binary only depends on `0.56.0`. On my machine, this PR makes `cargo build` about 10% faster. The polars plugin still uses its own version of the `windows` crate though, which is not ideal. We'll need to bump the `polars` crate to fix that, but it breaks a lot of our code. (`polars 1.0` release anyone?)
This commit is contained in:
@ -101,7 +101,7 @@ fn all_columns(span: Span) -> Value {
|
||||
let environment = {
|
||||
let mut env_rec = Record::new();
|
||||
for val in p.environ() {
|
||||
if let Some((key, value)) = val.split_once('=') {
|
||||
if let Some((key, value)) = val.to_string_lossy().split_once('=') {
|
||||
let is_env_var_a_list = {
|
||||
{
|
||||
#[cfg(target_family = "windows")]
|
||||
@ -146,8 +146,8 @@ fn all_columns(span: Span) -> Value {
|
||||
"root" => root,
|
||||
"cwd" => cwd,
|
||||
"exe_path" => exe_path,
|
||||
"command" => Value::string(p.cmd().join(" "), span),
|
||||
"name" => Value::string(p.name(), span),
|
||||
"command" => Value::string(p.cmd().join(std::ffi::OsStr::new(" ")).to_string_lossy(), span),
|
||||
"name" => Value::string(p.name().to_string_lossy(), span),
|
||||
"environment" => environment,
|
||||
},
|
||||
span,
|
||||
|
Reference in New Issue
Block a user