diff options
| -rw-r--r-- | resources/locales/en.yml | 4 | ||||
| -rw-r--r-- | resources/locales/zh-CN.yml | 4 | ||||
| -rw-r--r-- | src/bin/jv.rs | 8 |
3 files changed, 4 insertions, 12 deletions
diff --git a/resources/locales/en.yml b/resources/locales/en.yml index be88c60..d3c7085 100644 --- a/resources/locales/en.yml +++ b/resources/locales/en.yml @@ -646,7 +646,6 @@ jv: init_create_dir_not_empty: | The current directory is not empty! - If you are certain you want to create here, please use --force to force execution! create: Failed to create local workspace! init: Failed to create workspace here! @@ -1083,8 +1082,7 @@ jv: Successfully merged share `%{share_id}` into your sheet `%{sheet}` Upstream information has changed, please use `jv update` to sync to the latest information - success_reject: - Rejected share `%{share_id}` + success_reject: Rejected share `%{share_id}` has_conflicts: | Conflicts occurred when merging structure from share `%{share_id}` into your sheet! diff --git a/resources/locales/zh-CN.yml b/resources/locales/zh-CN.yml index 50441ff..dc9fa8a 100644 --- a/resources/locales/zh-CN.yml +++ b/resources/locales/zh-CN.yml @@ -639,7 +639,6 @@ jv: init_create_dir_not_empty: | 当前目录并不是空的! - 若您确实确定在此处创建,请使用 --force 来强制执行! create: 创建本地工作区失败! init: 在此处创建本地工作区失败! @@ -1074,8 +1073,7 @@ jv: 成功将分享 `%{share_id}` 合入您的表 `%{sheet}` 上游信息已变更,请使用 `jv update` 同步至最新信息 - success_reject: - 已拒绝接受分享 `%{share_id}` + success_reject: 已拒绝接受分享 `%{share_id}` has_conflicts: | 从分享 `%{share_id}` 合并结构到您的表时发生冲突! 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; } |
