Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure generate.sh has docker running before trying to generate, and make sure its running from the correct directory #9649

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions airbyte-integrations/connector-templates/generator/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ error_handler() {
trap 'error_handler $LINENO' ERR

set -e

# Ensure script always runs from this directory because thats how docker build contexts work
cd "$(dirname "${0}")" || exit 1

# Make sure docker is running before trying
if ! docker ps; then
echo "docker is not running, this script requires docker to be up"
echo "please start up the docker daemon!"
exit
fi

_UID=$(id -u)
_GID=$(id -g)
# Remove container if already exist
Expand All @@ -28,5 +39,3 @@ else
fi

echo "Finished running generator"

exit 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was redundant