Skip to content

Commit

Permalink
Fix generate.sh from bad trap for ERR signal in by using bash instead…
Browse files Browse the repository at this point in the history
… of sh (#9243)
  • Loading branch information
noahkawasakigoogle authored Jan 20, 2022
1 parent 8b149e8 commit 97eeb2f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

error_handler() {
echo "While trying to generate a connector, an error occurred on line $1 of generate.sh and the process aborted early. This is probably a bug."
Expand All @@ -21,10 +21,10 @@ docker build --build-arg UID="$_UID" --build-arg GID="$_GID" . -t airbyte/connec
# Run the container and mount the airbyte folder
if [ $# -eq 2 ]; then
echo "2 arguments supplied: 1=$1 2=$2"
docker run --name airbyte-connector-bootstrap --user $_UID:$_GID -e HOME=/tmp -e package_desc="$1" -e package_name="$2" -v "$(pwd)/../../../.":/airbyte airbyte/connector-bootstrap
docker run --name airbyte-connector-bootstrap --user "$_UID:$_GID" -e HOME=/tmp -e package_desc="$1" -e package_name="$2" -v "$(pwd)/../../../.":/airbyte airbyte/connector-bootstrap
else
echo "Running generator..."
docker run --rm -it --name airbyte-connector-bootstrap --user $_UID:$_GID -e HOME=/tmp -v "$(pwd)/../../../.":/airbyte airbyte/connector-bootstrap
docker run --rm -it --name airbyte-connector-bootstrap --user "$_UID:$_GID" -e HOME=/tmp -v "$(pwd)/../../../.":/airbyte airbyte/connector-bootstrap
fi

echo "Finished running generator"
Expand Down

0 comments on commit 97eeb2f

Please sign in to comment.