From 7431d10acad17978eb5775c6ded207c34714bda0 Mon Sep 17 00:00:00 2001 From: Sander Date: Thu, 25 Apr 2024 19:45:32 +0000 Subject: [PATCH] Use bash in post-build hook --- dist/main/index.js | 4 ++-- src/main.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/main/index.js b/dist/main/index.js index 1cd742ff..633cacba 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -7957,14 +7957,14 @@ async function execToVariable(command, args, options) { async function registerPostBuildHook(cachixBin, daemonDir) { const postBuildHookScriptPath = `${daemonDir}/post-build-hook.sh`; await fs.writeFile(postBuildHookScriptPath, ` - #!/bin/sh + #!/usr/bin/env bash set -eu set -f # disable globbing PUSH_FILTER="${pushFilter}" - function filterPaths { + filterPaths() { local regex=$1 local paths=$2 diff --git a/src/main.ts b/src/main.ts index 0d216377..127f39ab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -276,14 +276,14 @@ async function execToVariable(command: string, args?: string[], options?: exec.E async function registerPostBuildHook(cachixBin: string, daemonDir: string) { const postBuildHookScriptPath = `${daemonDir}/post-build-hook.sh`; await fs.writeFile(postBuildHookScriptPath, ` - #!/bin/sh + #!/usr/bin/env bash set -eu set -f # disable globbing PUSH_FILTER="${pushFilter}" - function filterPaths { + filterPaths() { local regex=$1 local paths=$2