Skip to content

Commit

Permalink
fixup. sp mistake in readme
Browse files Browse the repository at this point in the history
nit. cargo fmt
  • Loading branch information
juliusl committed Jan 4, 2024
1 parent eb290c9 commit ee6b045
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,9 @@ Scriptlet settings can be configured via `*_script_flags` and `*_script_prog` se
**Example**

```toml
pre_install_scriptlet = """
pre_install_script = """
echo preinstall
"""
pre_install_scriptlet_flags = 0b011 # Enables EXPAND and QFORMAT flags
pre_install_scriptlet_prog = ["/bin/blah/bash", "-c"] # Sets the interpreter/argument settings for the scriptlet
pre_install_script_flags = 0b011 # Enables EXPAND and QFORMAT flags
pre_install_script_prog = ["/bin/blah/bash", "-c"] # Sets the interpreter/argument settings for the scriptlet
```

10 changes: 8 additions & 2 deletions src/config/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,14 @@ mod test {
.expect("should be able to parse")
.expect("should be valid scriptlet");

assert_eq!(scriptlet.flags, Some(rpm::ScriptletFlags::EXPAND | rpm::ScriptletFlags::QFORMAT));
assert_eq!(scriptlet.program, Some(vec!["/bin/blah/bash".to_string(), "-c".to_string()]));
assert_eq!(
scriptlet.flags,
Some(rpm::ScriptletFlags::EXPAND | rpm::ScriptletFlags::QFORMAT)
);
assert_eq!(
scriptlet.program,
Some(vec!["/bin/blah/bash".to_string(), "-c".to_string()])
);
assert_eq!(scriptlet.script.as_str(), "echo hello world");
}
}

0 comments on commit ee6b045

Please sign in to comment.