Skip to content
This repository was archived by the owner on Jun 29, 2023. It is now read-only.

Commit 243e71d

Browse files
committed
Show a warning when cbd looks up Profiles from the PATH.
1 parent 5ff99a7 commit 243e71d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/deployer.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,10 @@ init-profile() {
275275
if [ -f $CBD_PROFILE ]; then
276276
debug "Use existing profile: $CBD_PROFILE"
277277
if [[ "$CBD_PROFILE" != *\/* ]]; then
278-
debug "$CBD_PROFILE file will be searched in your $PATH not just the current directory"
278+
PROFILES_ON_PATH="$(find $(echo $PATH | sed 's/:/ /g') -name 'Profile' -maxdepth 1 2>/dev/null | sort -u)" || true # for some reason I have to or true this
279+
if [[ -n $PROFILES_ON_PATH ]]; then
280+
warn "Multiple Profiles found on your path will be used, this might not be desirable:" $PROFILES_ON_PATH
281+
fi
279282
fi
280283
module-load "$CBD_PROFILE"
281284
fi

0 commit comments

Comments
 (0)