Skip to content

Commit

Permalink
Support path filtering when using the daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Apr 25, 2024
1 parent fb5cb83 commit 956354c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7962,6 +7962,12 @@ async function registerPostBuildHook(cachixBin, daemonDir) {
set -eu
set -f # disable globbing
PUSH_FILTER="${pushFilter}"
if [ -n "$PUSH_FILTER" ]; then
OUT_PATHS=$(echo "$OUT_PATHS" | grep -vEe "$PUSH_FILTER")
fi
exec ${cachixBin} daemon push \
--socket ${daemonDir}/daemon.sock \
$OUT_PATHS
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ async function registerPostBuildHook(cachixBin: string, daemonDir: string) {
set -eu
set -f # disable globbing
PUSH_FILTER="${pushFilter}"
if [ -n "$PUSH_FILTER" ]; then
OUT_PATHS=$(echo "$OUT_PATHS" | grep -vEe "$PUSH_FILTER")
fi
exec ${cachixBin} daemon push \
--socket ${daemonDir}/daemon.sock \
$OUT_PATHS
Expand Down

0 comments on commit 956354c

Please sign in to comment.