aboutsummaryrefslogtreecommitdiff
path: root/integration/apps/bun-run-check.sh
blob: b6e9edda9971541b0d765a5ae6c011aba2e748db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

killall -9 $(basename $BUN_BIN) || echo "";

# https://github.com/Jarred-Sumner/bun/issues/40
# Define a function (details aren't important)
fn() { :; }
# The important bit: export the function
export -f fn


rm -rf /tmp/bun-run-check
mkdir -p /tmp/bun-run-check


cp ./bun-run-check-package.json /tmp/bun-run-check/package.json
cd /tmp/bun-run-check

$BUN_BIN run bash -- -c ""

if (( $? )); then
    echo "Bash exported functions are broken"
    exit 1
fi

$BUN_BIN run --silent this-should-work

exit $?