Skip to content

Commit 7ecdae4

Browse files
committed
Add function to check if an option was set (even if empty)
1 parent 69b94f6 commit 7ecdae4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/shared.bash

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ function plugin_read_list_into_result() {
8686
[[ ${#result[@]} -gt 0 ]] || return 1
8787
}
8888

89+
function plugin_config_exists() {
90+
local var="BUILDKITE_PLUGIN_DOCKER_COMPOSE_${1}"
91+
92+
# Check if the variable is set
93+
[ "${!var+is_set}" != "" ]
94+
}
95+
8996
# Returns the name of the docker compose project for this build
9097
function docker_compose_project_name() {
9198
# No dashes or underscores because docker-compose will remove them anyways

0 commit comments

Comments
 (0)