We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74a457c commit c2cb41fCopy full SHA for c2cb41f
scripts/.util/tools.sh
@@ -148,10 +148,17 @@ function util::tools::cf::install() {
148
exit 1
149
esac
150
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
+
158
if [[ ! -f "${dir}/cf" ]]; then
159
util::print::title "Installing cf"
160
- 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" \
162
--silent \
163
--location \
164
--output /tmp/cf.tar.gz
0 commit comments