summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-07 19:11:42 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-07 19:11:42 +0800
commitc13275142639af54edf5b9a0363b7bfcb6b48711 (patch)
tree3229999811c3500b1fb5973850dceaa6b4a2400a /src/bin
parent81ea89384eb4cfda14518a6ccb439d97399ad74f (diff)
Remove --force flag from jv init command
The --force flag is no longer needed as the command now always checks if the directory is empty. The corresponding help text in locale files has also been removed.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jv.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/bin/jv.rs b/src/bin/jv.rs
index 1bed0d9..de8de61 100644
--- a/src/bin/jv.rs
+++ b/src/bin/jv.rs
@@ -468,10 +468,6 @@ struct InitWorkspaceArgs {
/// Show help information
#[arg(short, long)]
help: bool,
-
- /// Force create, ignore files in the directory
- #[arg(short, long)]
- force: bool,
}
#[derive(Parser, Debug)]
@@ -1410,7 +1406,7 @@ async fn jv_create(args: CreateWorkspaceArgs) {
}
}
-async fn jv_init(args: InitWorkspaceArgs) {
+async fn jv_init(_args: InitWorkspaceArgs) {
let path = match current_dir() {
Ok(path) => path,
Err(e) => {
@@ -1419,7 +1415,7 @@ async fn jv_init(args: InitWorkspaceArgs) {
}
};
- if !args.force && path.exists() && !is_directory_empty(&path).await {
+ if path.exists() && !is_directory_empty(&path).await {
eprintln!("{}", t!("jv.fail.init_create_dir_not_empty").trim());
return;
}