Skip to content

Commit 1d951e9

Browse files
committed
Overwrite CLI installation
1 parent f250d28 commit 1d951e9

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cortex.sh

+2-7
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,6 @@ function check_dep_curl() {
260260
function install_cli() {
261261
set -e
262262

263-
if command -v cortex >/dev/null; then
264-
echo "The Cortex CLI is already installed"
265-
return
266-
fi
267-
268263
check_dep_curl
269264

270265
echo -e "\nInstalling the Cortex CLI (/usr/local/bin/cortex) ..."
@@ -275,10 +270,10 @@ function install_cli() {
275270
chmod +x $CORTEX_SH_TMP_DIR/cortex
276271

277272
if [ $(id -u) = 0 ]; then
278-
mv $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
273+
mv -f $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
279274
else
280275
ask_sudo
281-
sudo mv $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
276+
sudo mv -f $CORTEX_SH_TMP_DIR/cortex /usr/local/bin/cortex
282277
fi
283278

284279
rm -rf $CORTEX_SH_TMP_DIR

0 commit comments

Comments
 (0)