Skip to content

Commit 5bf1ebf

Browse files
committed
refactor: use vite_command to run command
1 parent bb0f097 commit 5bf1ebf

52 files changed

Lines changed: 19 additions & 393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/vite_install/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,18 @@ tar = { workspace = true }
2525
tempfile = { workspace = true }
2626
tokio = { workspace = true, features = ["full"] }
2727
tracing = { workspace = true }
28+
vite_command = { workspace = true }
2829
vite_error = { workspace = true }
2930
vite_glob = { workspace = true }
3031
vite_path = { workspace = true }
3132
vite_str = { workspace = true }
3233
vite_workspace = { workspace = true }
33-
which = { workspace = true, features = ["tracing"] }
3434

3535
[target.'cfg(target_os = "windows")'.dependencies]
3636
reqwest = { workspace = true, features = ["stream", "native-tls-vendored", "json"] }
3737

3838
[target.'cfg(not(target_os = "windows"))'.dependencies]
3939
reqwest = { workspace = true, features = ["stream", "rustls-tls", "json"] }
40-
nix = { workspace = true }
4140

4241
[dev-dependencies]
4342
httpmock = { workspace = true }

crates/vite_install/src/commands/add.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// The type of dependency to save.

crates/vite_install/src/commands/dedupe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Options for the dedupe command.

crates/vite_install/src/commands/link.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Options for the link command.

crates/vite_install/src/commands/outdated.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus, str::FromStr};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Output format for the outdated command.

crates/vite_install/src/commands/remove.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Options for the remove command.

crates/vite_install/src/commands/unlink.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Options for the unlink command.

crates/vite_install/src/commands/update.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Options for the update command.

crates/vite_install/src/commands/why.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
use std::{collections::HashMap, process::ExitStatus};
22

3+
use vite_command::run_command;
34
use vite_error::Error;
45
use vite_path::AbsolutePath;
56

67
use crate::package_manager::{
7-
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env, run_command,
8+
PackageManager, PackageManagerType, ResolveCommandResult, format_path_env,
89
};
910

1011
/// Options for the why command.

0 commit comments

Comments
 (0)