1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00
metamask-extension/development/run-ganache
Whymarrh Whitby caa40912ac
Replace deprecated shell-parallel with concurrently (#6807)
* Replace shell-parallel with concurrently

* Update ganache-cli
2019-07-09 14:09:31 -02:30

29 lines
624 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -u
set -o pipefail
ganache_cli="$(npm bin)/ganache-cli"
seed_phrase="${GANACHE_SEED_PHRASE:-phrase upgrade clock rough situate wedding elder clever doctor stamp excess tent}"
_term () {
printf '%s\n' "Received SIGTERM, sending SIGKILL to Ganache"
kill -KILL "$child" 2>/dev/null
exit 42
}
_int () {
printf '%s\n' "Received SIGINT, sending SIGKILL to Ganache"
kill -KILL "$child" 2>/dev/null
exit 42
}
trap _term SIGTERM
trap _int SIGINT
$ganache_cli --noVMErrorsOnRPCResponse --networkId 5777 --mnemonic "$seed_phrase" ${GANACHE_ARGS:-} &
child=$!
wait "$child"