diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-30 16:25:12 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-30 16:25:12 +0100 |
| commit | 910a635e76ca97519adcf472c28e433eab0ac205 (patch) | |
| tree | 2835b2505ca9fde6c1a27fb77b071d94a7f11311 /pkgs/by-name | |
| parent | pkgs/yt: 1.8.0 -> 1.9.0 (diff) | |
| download | nixos-config-910a635e76ca97519adcf472c28e433eab0ac205.zip | |
pkgs/notify-run: Allow spawning commands without arguments prime
Diffstat (limited to 'pkgs/by-name')
| -rw-r--r-- | pkgs/by-name/no/notify-run/src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/by-name/no/notify-run/src/main.rs b/pkgs/by-name/no/notify-run/src/main.rs index 2aefd4df..de625627 100644 --- a/pkgs/by-name/no/notify-run/src/main.rs +++ b/pkgs/by-name/no/notify-run/src/main.rs @@ -16,7 +16,9 @@ fn main() -> Result<()> { let args = args().skip(1).collect::<Vec<_>>(); let mut cmd = Command::new(&args[0]); - cmd.args(args[1].split(" ").collect::<Vec<_>>().as_slice()); + if let Some(arguments) = args.get(1) { + cmd.args(arguments.split(" ").collect::<Vec<_>>().as_slice()); + } eprintln!("Spawning {:?}", cmd); |
