mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 18:14:11 +02:00
nix setup
This commit is contained in:
parent
a64225eda6
commit
20464a8f68
8 changed files with 46 additions and 140 deletions
|
|
@ -1,19 +1,13 @@
|
|||
use clap::Parser;
|
||||
use logging_extractor::error::Error;
|
||||
use logging_extractor::extract_dir;
|
||||
use std::env::args;
|
||||
use std::fs::canonicalize;
|
||||
use std::io::stdout;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
struct Args {
|
||||
root: PathBuf,
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
let args = Args::parse();
|
||||
let root = canonicalize(&args.root).map_err(|err| Error::RealPath {
|
||||
path: args.root,
|
||||
let root = args().nth(1).expect("no root provided");
|
||||
let root = canonicalize(&root).map_err(|err| Error::RealPath {
|
||||
path: root.into(),
|
||||
err,
|
||||
})?;
|
||||
let root = root.to_str().expect("non utf8 root path");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue