Skip to content

Commit

Permalink
refactor(task): sort lib matching
Browse files Browse the repository at this point in the history
  • Loading branch information
gibfahn committed Apr 24, 2024
1 parent 54ad5de commit 3e4c250
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/tasks/defaults/plist_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ELLIPSIS: &str = "...";
/**
Get the path to the plist file given a domain.
This function does not handle root-owned preferences, e.g. those at `/Library/Preferences/`.
This function does not handle root-owned preferences, e.g. those at `/Library/Preferences/` or `/var/root/Library/Preferences/`.
## Preferences Locations
Expand Down
24 changes: 12 additions & 12 deletions src/tasks/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,10 @@ impl Task {
let maybe_data = self.config.data.clone();

let status = match lib.as_str() {
"link" => {
let data: LinkOptions =
parse_task_config(maybe_data, &self.name, false, env_fn)?;
tasks::link::run(data, task_tempdir)
}

"git" => {
let data: Vec<GitConfig> =
"defaults" => {
let data: DefaultsConfig =
parse_task_config(maybe_data, &self.name, false, env_fn)?;
tasks::git::run(&data)
tasks::defaults::run(data, task_tempdir)
}

"generate_git" => {
Expand All @@ -224,10 +218,16 @@ impl Task {
generate::git::run(&data)
}

"defaults" => {
let data: DefaultsConfig =
"git" => {
let data: Vec<GitConfig> =
parse_task_config(maybe_data, &self.name, false, env_fn)?;
tasks::defaults::run(data, task_tempdir)
tasks::git::run(&data)
}

"link" => {
let data: LinkOptions =
parse_task_config(maybe_data, &self.name, false, env_fn)?;
tasks::link::run(data, task_tempdir)
}

"self" => {
Expand Down

0 comments on commit 3e4c250

Please sign in to comment.