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

Commit dfbf773

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

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/deployer.bash

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,16 @@ start-time-init() {
271271

272272
init-profile() {
273273
declare desc="Creates Profile if missing"
274-
274+
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."
281+
warn "${PROFILES_ON_PATH}"
282+
fi
283+
echo $PROFILES
279284
fi
280285
module-load "$CBD_PROFILE"
281286
fi

0 commit comments

Comments
 (0)