summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jv.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/jv.rs b/src/bin/jv.rs
index e71b6d6..773af96 100644
--- a/src/bin/jv.rs
+++ b/src/bin/jv.rs
@@ -33,6 +33,7 @@ use just_enough_vcs::{
LocalWorkspace, align::AlignTasks, cached_sheet::CachedSheet, config::LocalConfig,
file_status::AnalyzeResult, latest_file_data::LatestFileData,
latest_info::LatestInfo, local_files::get_relative_paths,
+ vault_modified::check_vault_modified,
},
member::{Member, MemberId},
user::UserDirectory,
@@ -62,7 +63,7 @@ use just_enough_vcs_cli::{
},
utils::{
display::{SimpleTable, md, size_str},
- env::current_locales,
+ env::{current_locales, enable_auto_update},
fs::move_across_partitions,
input::{confirm_hint, confirm_hint_or, input_with_editor, show_in_pager},
socket_addr_helper,
@@ -604,6 +605,11 @@ async fn main() {
#[cfg(windows)]
colored::control::set_virtual_terminal(true).unwrap();
+ // Auto update
+ if enable_auto_update() && check_vault_modified().await {
+ jv_update(UpdateArgs { help: false }).await;
+ }
+
let Ok(parser) = JustEnoughVcsWorkspace::try_parse() else {
eprintln!("{}", md(t!("jv.fail.parse.parser_failed")));