Skip to content

Commit 7decb12

Browse files
authored
Slightly improve sed-based yaml parsing (#4721)
Previous sed did not handle the valid `profile: foo`
1 parent 27ec657 commit 7decb12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

airbyte-workers/src/main/resources/dbt_transformation_entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
CWD=$(pwd)
55
if [[ -f "${CWD}/git_repo/dbt_project.yml" ]]; then
66
# Find profile name used in the custom dbt project:
7-
PROFILE_NAME=$(grep -e "profile:" < "${CWD}/git_repo/dbt_project.yml" | sed -E "s/profile: *['\"](.*)['\"]/\1/")
7+
PROFILE_NAME=$(grep -e "profile:" < "${CWD}/git_repo/dbt_project.yml" | sed -E "s/profile: *['\"]?([^'\"]*)['\"]?/\1/")
88
if [[ -n "${PROFILE_NAME}" ]]; then
99
mv "${CWD}/profiles.yml" "${CWD}/profiles.txt"
1010
# Refer to the appropriate profile name in the profiles.yml file

0 commit comments

Comments
 (0)