Skip to content

Commit

Permalink
env-man
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 26, 2024
1 parent 91b9fc1 commit 44cab31
Show file tree
Hide file tree
Showing 14 changed files with 580 additions and 259 deletions.
9 changes: 5 additions & 4 deletions src/cli/hook_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ pub struct HookEnv {
impl HookEnv {
pub fn run(self) -> Result<()> {
let config = Config::try_get()?;
let watch_files: Vec<_> = config
let watch_files = config
.config_files
.values()
.flat_map(|p| p.watch_files())
.collect();
.map(|p| p.watch_files())
.flatten_ok()
.collect::<eyre::Result<Vec<_>>>()?;
if hook_env::should_exit_early(&watch_files) {
return Ok(());
}
Expand All @@ -51,7 +52,7 @@ impl HookEnv {
let mut diff = EnvDiff::new(&env::PRISTINE_ENV, env);
let mut patches = diff.to_patches();

let mut paths = config.path_dirs.clone();
let mut paths = config.path_dirs()?.clone();
if let Some(p) = env_path {
paths.extend(split_paths(&p).collect_vec());
}
Expand Down
Loading

0 comments on commit 44cab31

Please sign in to comment.