Skip to content

Commit 61df436

Browse files
ospillingerdeliahu
authored andcommitted
Overwrite CLI installation
(cherry picked from commit 1d951e9)
1 parent eff1413 commit 61df436

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cortex.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,6 @@ function check_dep_curl() {
242242
function install_cli() {
243243
set -e
244244

245-
if command -v cortex >/dev/null; then
246-
echo "The Cortex CLI is already installed"
247-
return
248-
fi
249-
250245
check_dep_curl
251246

252247
echo -e "\nInstalling the Cortex CLI (/usr/local/bin/cortex) ..."
@@ -257,10 +252,10 @@ function install_cli() {
257252
chmod +x $CORTEX_SH_TMP_DIR/cortex
258253

259254
if [ $(id -u) = 0 ]; then
260-
mv $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
255+
mv -f $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
261256
else
262257
ask_sudo
263-
sudo mv $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
258+
sudo mv -f $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
264259
fi
265260

266261
rm -rf $CORTEX_SH_TMP_DIR

0 commit comments

Comments
 (0)