From 7965e647fe533e4eb4fa85c0ae7bdd9f9814a89a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Feb 2024 15:05:59 +0100 Subject: [PATCH] Fix support for multiple output derivations OUT_PATHS is split by spaces, not newlines. --- magic-nix-cache/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/magic-nix-cache/src/main.rs b/magic-nix-cache/src/main.rs index 5c5befe..c31bc8e 100644 --- a/magic-nix-cache/src/main.rs +++ b/magic-nix-cache/src/main.rs @@ -330,7 +330,10 @@ async fn post_build_hook(out_paths: &str) { let args = Args::parse(); - let store_paths: Vec<_> = out_paths.lines().map(str::to_owned).collect(); + let store_paths: Vec<_> = out_paths + .split_whitespace() + .map(|s| s.trim().to_owned()) + .collect(); let request = api::EnqueuePathsRequest { store_paths };