Skip to content

Commit

Permalink
#810: added warning message to setup explaining that a new shell need…
Browse files Browse the repository at this point in the history
…s to be started to use IDEasy (#819)
  • Loading branch information
hohwille authored Nov 28, 2024
1 parent c993397 commit b2df9f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/main/package/functions
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function icd() {
ide init
return
elif [ $# -gt 2 ]; then
echo -e "\033[93mInvalid usage icd $*\033[39m" >&2
echo -e "\033[91mInvalid usage icd $*\033[39m" >&2
return 1
fi
if [ "$1" = "-p" ]; then
Expand Down
3 changes: 3 additions & 0 deletions cli/src/main/package/setup
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function doSetupInConfigFile() {
cd "$(dirname "${BASH_SOURCE:-$0}")" || exit 255
if [ "${PWD/*\//}" != "_ide" ]; then
echo -e "\033[93mInvalid installation path $PWD - you need to install IDEasy to a folder named '_ide'.\033[39m" >&2
exit 1
fi
echo "Setting up IDEasy in ${PWD}"
cd ..
Expand All @@ -30,3 +31,5 @@ source "$IDE_ROOT/_ide/functions"

doSetupInConfigFile ~/.bashrc
doSetupInConfigFile ~/.zshrc

echo -e "\033[93mATTENTION: IDEasy has been setup for your shells but you need to start a new shell to make it work.\nOnly if you invoked this setup script by sourcing it, you are able to run 'ide' and 'icd' commands without starting a new shell.\n\033[39m" >&2

0 comments on commit b2df9f7

Please sign in to comment.