diff --git a/hooks/post-command b/hooks/post-command index b27da01..2782140 100755 --- a/hooks/post-command +++ b/hooks/post-command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # # This script is run after the command has completed, and updates the job run status in factory. diff --git a/hooks/pre-command b/hooks/pre-command index df65558..d5bdc4f 100755 --- a/hooks/pre-command +++ b/hooks/pre-command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. set -eo pipefail diff --git a/tests/post-command.bats b/tests/post-command.bats index 1293245..1802d9c 100755 --- a/tests/post-command.bats +++ b/tests/post-command.bats @@ -37,7 +37,7 @@ EOF setup() { # Create mock factory-command in the PATH. # This is more convenient than using a stub that is called multiple times. - local tmpdir="${BATS_TEST_TMPDIR/bin}" + local tmpdir="$BATS_TEST_TMPDIR/bin" mkdir -p "$tmpdir" create_mock_factory_command "$tmpdir" export PATH="$tmpdir:$PATH" diff --git a/tests/pre-command.bats b/tests/pre-command.bats index 3b9f031..3e6bf91 100755 --- a/tests/pre-command.bats +++ b/tests/pre-command.bats @@ -18,7 +18,7 @@ setup_file() { setup() { # Create mock executable commands in the PATH - local tmpdir="${BATS_TEST_TMPDIR/bin}" + local tmpdir="$BATS_TEST_TMPDIR/bin" mkdir -p "$tmpdir" create_mock_factory_command "$tmpdir" export PATH="$tmpdir:$PATH"