mirror of
https://github.com/nushell/nushell
synced 2024-12-29 14:33:13 +00:00
Log warning message if nu failed to sync history (#6106)
Fixes #6088 Signed-off-by: nibon7 <nibon7@163.com>
This commit is contained in:
parent
388ff78a26
commit
0b429fde24
1 changed files with 5 additions and 2 deletions
|
@ -6,7 +6,7 @@ use crate::{
|
||||||
NuHighlighter, NuValidator, NushellPrompt,
|
NuHighlighter, NuValidator, NushellPrompt,
|
||||||
};
|
};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use log::{info, trace};
|
use log::{info, trace, warn};
|
||||||
use miette::{IntoDiagnostic, Result};
|
use miette::{IntoDiagnostic, Result};
|
||||||
use nu_color_config::get_color_config;
|
use nu_color_config::get_color_config;
|
||||||
use nu_engine::{convert_env_values, eval_block};
|
use nu_engine::{convert_env_values, eval_block};
|
||||||
|
@ -216,7 +216,10 @@ pub fn evaluate_repl(
|
||||||
if is_perf_true {
|
if is_perf_true {
|
||||||
info!("sync history {}:{}:{}", file!(), line!(), column!());
|
info!("sync history {}:{}:{}", file!(), line!(), column!());
|
||||||
}
|
}
|
||||||
line_editor.sync_history().into_diagnostic()?;
|
|
||||||
|
if let Err(e) = line_editor.sync_history() {
|
||||||
|
warn!("Failed to sync history: {}", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if is_perf_true {
|
if is_perf_true {
|
||||||
|
|
Loading…
Reference in a new issue