mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 15:45:11 +01:00
chore: change to space separated list
This commit is contained in:
parent
039e609aaa
commit
5b521dff09
6 changed files with 6 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- **BREAKING:** Executable list passed to modules is now a space ` ` instead of a comma `,`
|
||||||
- Skip privilege elevation for `nix`
|
- Skip privilege elevation for `nix`
|
||||||
|
|
||||||
## [0.6.1] - 2024-12-09
|
## [0.6.1] - 2024-12-09
|
||||||
|
|
|
||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -494,7 +494,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pay-respects-module-runtime-rules"
|
name = "pay-respects-module-runtime-rules"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pay-respects-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pay-respects-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex-lite",
|
"regex-lite",
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ pub fn module_output(data: &Data, module: &str) -> Option<Vec<String>> {
|
||||||
let executable = &data.split[0];
|
let executable = &data.split[0];
|
||||||
let last_command = &data.command;
|
let last_command = &data.command;
|
||||||
let error_msg = &data.error;
|
let error_msg = &data.error;
|
||||||
let executables = data.executables.clone().join(",");
|
let executables = data.executables.clone().join(" ");
|
||||||
let output = std::process::Command::new(shell)
|
let output = std::process::Command::new(shell)
|
||||||
.arg("-c")
|
.arg("-c")
|
||||||
.arg(module)
|
.arg(module)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pay-respects-module-runtime-rules"
|
name = "pay-respects-module-runtime-rules"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# for crates.io
|
# for crates.io
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ fn main() -> Result<(), std::io::Error> {
|
||||||
let error_msg = std::env::var("_PR_ERROR_MSG").expect("_PR_ERROR_MSG not set");
|
let error_msg = std::env::var("_PR_ERROR_MSG").expect("_PR_ERROR_MSG not set");
|
||||||
let executables: Vec<String> = {
|
let executables: Vec<String> = {
|
||||||
let executables = std::env::var("_PR_EXECUTABLES").expect("_PR_EXECUTABLES not set");
|
let executables = std::env::var("_PR_EXECUTABLES").expect("_PR_EXECUTABLES not set");
|
||||||
executables.split(",").map(|s| s.to_string()).collect()
|
executables.split(" ").map(|s| s.to_string()).collect()
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ When running your module, you will get the following environment variables:
|
||||||
- `_PR_COMMAND`: The command, without arguments
|
- `_PR_COMMAND`: The command, without arguments
|
||||||
- `_PR_LAST_COMMAND`: Full command with arguments
|
- `_PR_LAST_COMMAND`: Full command with arguments
|
||||||
- `_PR_ERROR_MSG`: Error message from the command
|
- `_PR_ERROR_MSG`: Error message from the command
|
||||||
- `_PR_EXECUTABLES`: A comma (`,`) separated list of executables in `PATH`
|
- `_PR_EXECUTABLES`: A space (` `) separated list of executables in `PATH`
|
||||||
|
|
||||||
Your module should return:
|
Your module should return:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue