diff options
| author | diogo464 <[email protected]> | 2022-02-08 09:19:19 +0000 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2022-02-08 09:19:19 +0000 |
| commit | 0992c36733f58750da93921041424fd09f0158ed (patch) | |
| tree | 4d4eeba8347ab3e10a26dddcb82b8578f3c2aec2 /dotup_cli/src/main.rs | |
| parent | 6817631ddee3795af3a558bf38e477da4ae5b1cb (diff) | |
snapshot before removal
Diffstat (limited to 'dotup_cli/src/main.rs')
| -rw-r--r-- | dotup_cli/src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dotup_cli/src/main.rs b/dotup_cli/src/main.rs index 6161ca7..0d730da 100644 --- a/dotup_cli/src/main.rs +++ b/dotup_cli/src/main.rs | |||
| @@ -58,6 +58,7 @@ struct Opts { | |||
| 58 | enum SubCommand { | 58 | enum SubCommand { |
| 59 | Init(commands::init::Opts), | 59 | Init(commands::init::Opts), |
| 60 | Link(commands::link::Opts), | 60 | Link(commands::link::Opts), |
| 61 | Mv(commands::mv::Opts), | ||
| 61 | Status(commands::status::Opts), | 62 | Status(commands::status::Opts), |
| 62 | Unlink(commands::unlink::Opts), | 63 | Unlink(commands::unlink::Opts), |
| 63 | Install(commands::install::Opts), | 64 | Install(commands::install::Opts), |
| @@ -89,16 +90,19 @@ fn main() -> anyhow::Result<()> { | |||
| 89 | Some(path) => path, | 90 | Some(path) => path, |
| 90 | None => utils::home_directory()?, | 91 | None => utils::home_directory()?, |
| 91 | }; | 92 | }; |
| 93 | let working_path = std::env::current_dir().expect("Failed to obtain current working directory"); | ||
| 92 | log::debug!("Archive path : {}", archive_path.display()); | 94 | log::debug!("Archive path : {}", archive_path.display()); |
| 93 | 95 | ||
| 94 | let config = Config { | 96 | let config = Config { |
| 95 | archive_path, | 97 | archive_path, |
| 96 | install_path, | 98 | install_path, |
| 99 | working_path, | ||
| 97 | }; | 100 | }; |
| 98 | 101 | ||
| 99 | match opts.subcmd { | 102 | match opts.subcmd { |
| 100 | SubCommand::Init(opts) => commands::init::main(config, opts), | 103 | SubCommand::Init(opts) => commands::init::main(config, opts), |
| 101 | SubCommand::Link(opts) => commands::link::main(config, opts), | 104 | SubCommand::Link(opts) => commands::link::main(config, opts), |
| 105 | SubCommand::Mv(opts) => commands::mv::main(config, opts), | ||
| 102 | SubCommand::Status(opts) => commands::status::main(config, opts), | 106 | SubCommand::Status(opts) => commands::status::main(config, opts), |
| 103 | SubCommand::Unlink(opts) => commands::unlink::main(config, opts), | 107 | SubCommand::Unlink(opts) => commands::unlink::main(config, opts), |
| 104 | SubCommand::Install(opts) => commands::install::main(config, opts), | 108 | SubCommand::Install(opts) => commands::install::main(config, opts), |
