From 1d296d094ca2d429572707d2e9ce2353de8b531c Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Thu, 23 Feb 2023 00:54:31 +0800 Subject: [PATCH] chore: fix fn typo --- commit-msg-rs/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commit-msg-rs/src/main.rs b/commit-msg-rs/src/main.rs index c1682c3..9a9b023 100644 --- a/commit-msg-rs/src/main.rs +++ b/commit-msg-rs/src/main.rs @@ -167,7 +167,7 @@ fn copy_file_and_apply_executable_permission(from: &PathBuf, to: &PathBuf) { fn install_commit_msg(force: bool) { let commit_msg_crs = get_home_e().join("bin").join("commit-msg.rs"); - let commig_msg_exec_file = if commit_msg_crs.exists() { + let commit_msg_exec_file = if commit_msg_crs.exists() { commit_msg_crs } else { warning!("File {:?} NOT exists!", commit_msg_crs); @@ -183,7 +183,7 @@ fn install_commit_msg(force: bool) { failure_and_exit!("File {:?} exists! or try {}forceinstall{}.", git_hooks_commit_msg, BOLD, END); } - copy_file_and_apply_executable_permission(&commig_msg_exec_file, &git_hooks_commit_msg); + copy_file_and_apply_executable_permission(&commit_msg_exec_file, &git_hooks_commit_msg); success!("Install commit-msg to repo succeed!"); }