Skip to content

Commit

Permalink
hopefully error when script missing
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Oct 1, 2023
1 parent ee3e5e2 commit 13d451a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,17 @@ impl Manifest {

for script in &mut manifest.scripts.pre {
if let Some(f) = script.file.as_mut() {
let cn = path_can.join(&f);
trace!(f = ?cn, "Canonicalizing script path");
*f = path_can.join(&f);
trace!(f = ?f, "Loading Script file");
let cn = path_can.join(&f).canonicalize()?;
*f = cn;
}
}

for script in &mut manifest.scripts.post {
if let Some(f) = script.file.as_mut() {

let cn = path_can.join(&f);
trace!(f = ?cn, "Canonicalizing script path");
*f = path_can.join(&f);
trace!(f = ?f, "Loading script file");
let cn = path_can.join(&f).canonicalize()?;
*f = cn;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ng/katsu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ scripts:

- id: selinux-label
name: Relabel SELinux for new filesystem
file: selinux-label.sh
file: selinux.sh

dnf:
releasever: 38
Expand Down

0 comments on commit 13d451a

Please sign in to comment.