Compare commits
2 Commits
f5c67c64d7
...
0d176bca40
Author | SHA1 | Date |
---|---|---|
minish | 0d176bca40 | |
minish | a0ffd1ddd1 |
|
@ -1,5 +1,5 @@
|
||||||
# builder
|
# builder
|
||||||
FROM rust:1.73 as builder
|
FROM rust:1.74 as builder
|
||||||
|
|
||||||
WORKDIR /usr/src/breeze
|
WORKDIR /usr/src/breeze
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
@ -21,7 +21,8 @@ mod view;
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// The path to configuration file
|
/// The path to configuration file
|
||||||
config: Option<PathBuf>,
|
#[arg(short, long, value_name = "file")]
|
||||||
|
config: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
@ -30,7 +31,7 @@ async fn main() {
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
|
|
||||||
// read & parse config
|
// read & parse config
|
||||||
let config_str = fs::read_to_string(args.config.unwrap_or("./breeze.toml".into()))
|
let config_str = fs::read_to_string(args.config)
|
||||||
.await
|
.await
|
||||||
.expect("failed to read config file! make sure it exists and you have read permissions");
|
.expect("failed to read config file! make sure it exists and you have read permissions");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue