You've already forked AstralRinth
forked from didirus/AstralRinth
Move launcher working directory to standard location (#31)
* Move launcher working directory to standard location * Fix settings save, attempt to get better backtraces * Add environment variable for settings path
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use eyre::Result;
|
||||
use futures::TryFutureExt;
|
||||
use paris::*;
|
||||
|
||||
mod subcommands;
|
||||
@@ -16,12 +17,8 @@ async fn main() -> Result<()> {
|
||||
let args = argh::from_env::<Args>();
|
||||
theseus::init().await?;
|
||||
|
||||
let res = args.dispatch().await;
|
||||
if res.is_err() {
|
||||
error!("An error has occurred!\n");
|
||||
} else {
|
||||
theseus::save().await?;
|
||||
}
|
||||
|
||||
res
|
||||
args.dispatch()
|
||||
.inspect_err(|_| error!("An error has occurred!\n"))
|
||||
.and_then(|_| async { Ok(theseus::save().await?) })
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user