Skip to content

Commit c2cb41f

Browse files
Updating github-config
1 parent 74a457c commit c2cb41f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/.util/tools.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,17 @@ function util::tools::cf::install() {
148148
exit 1
149149
esac
150150

151+
# Check if cf already exists in the target directory or system PATH
152+
if [[ -f "${dir}/cf" ]] || command -v cf >/dev/null 2>&1; then
153+
util::print::title "CF CLI already installed (using system version)"
154+
cf version
155+
return 0
156+
fi
157+
151158
if [[ ! -f "${dir}/cf" ]]; then
152159
util::print::title "Installing cf"
153160

154-
curl "https://packages.cloudfoundry.org/stable?release=${os}-binary&version=6.49.0&source=github-rel" \
161+
curl "https://packages.cloudfoundry.org/stable?release=${os}-binary&source=github-rel" \
155162
--silent \
156163
--location \
157164
--output /tmp/cf.tar.gz

0 commit comments

Comments
 (0)