mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-13 14:33:47 +00:00
stash: import all entries by default; log if db import fails
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a6964804698d2e83a37ec2688e9c126cf412b
This commit is contained in:
parent
6a5cd9b95d
commit
f39937d3ca
1 changed files with 5 additions and 2 deletions
|
|
@ -33,7 +33,8 @@ struct Cli {
|
|||
#[command(subcommand)]
|
||||
command: Option<Command>,
|
||||
|
||||
#[arg(long, default_value_t = 750)]
|
||||
/// Maximum number of clipboard entries to keep
|
||||
#[arg(long, default_value_t = u64::MAX)]
|
||||
max_items: u64,
|
||||
|
||||
#[arg(long, default_value_t = 100)]
|
||||
|
|
@ -298,7 +299,9 @@ fn main() {
|
|||
let format = r#type.as_deref().unwrap_or("tsv");
|
||||
match format {
|
||||
"tsv" => {
|
||||
db.import_tsv(io::stdin());
|
||||
if let Err(e) = db.import_tsv(io::stdin(), cli.max_items) {
|
||||
log::error!("Failed to import TSV: {e}");
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
log::error!("Unsupported import format: {format}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue