aboutsummaryrefslogtreecommitdiff
path: root/dotup_cli/src/commands/status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dotup_cli/src/commands/status.rs')
-rw-r--r--dotup_cli/src/commands/status.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/dotup_cli/src/commands/status.rs b/dotup_cli/src/commands/status.rs
index e05ada9..b7221db 100644
--- a/dotup_cli/src/commands/status.rs
+++ b/dotup_cli/src/commands/status.rs
@@ -25,7 +25,7 @@ pub struct Opts {
25#[derive(Debug)] 25#[derive(Debug)]
26struct State { 26struct State {
27 max_depth: u32, 27 max_depth: u32,
28 install_base: PathBuf, 28 install_path: PathBuf,
29} 29}
30 30
31pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> { 31pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> {
@@ -67,9 +67,7 @@ pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> {
67 67
68 let state = State { 68 let state = State {
69 max_depth: u32::MAX, 69 max_depth: u32::MAX,
70 install_base: opts 70 install_path: config.install_path,
71 .install_base
72 .unwrap_or(utils::home_directory().unwrap()),
73 }; 71 };
74 72
75 let (directories, files) = utils::collect_read_dir_split(".")?; 73 let (directories, files) = utils::collect_read_dir_split(".")?;
@@ -142,7 +140,7 @@ fn print_link(depot: &Depot, state: &State, link: &Link, depth: u32) {
142 }; 140 };
143 141
144 print_identation(depth); 142 print_identation(depth);
145 if depot.is_link_installed(link, &state.install_base) { 143 if depot.is_link_installed(link, &state.install_path) {
146 println!( 144 println!(
147 "{} -> {}", 145 "{} -> {}",
148 Colour::Green.paint(&format!("{}", filename.to_string_lossy())), 146 Colour::Green.paint(&format!("{}", filename.to_string_lossy())),