Skip to content

Commit

Permalink
#260: Implement exit code in wrapper script (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvomiero authored Apr 9, 2024
1 parent 3df645d commit d8c158e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cli/src/main/package/bin/ide
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env bash

# immediately exit on errors
set -e

# Check if arguments are given
if [ -n "${1}" ]; then
# Call native ideasy with user-provided arguments
ideasy "$@"
# Call native ideasy with user-provided arguments
ideasy "$@"
return_code=$?
if [ $return_code -ne 0 ]; then # Check if ideasy exit code is not equal to 0
echo -e "\n\033[91mError: IDEasy failed with exit code $return_code \033[91m" >&2 # Print error message to stderr
return $return_code # Return the same error code as ideasy
fi

ide_env=
Expand Down

0 comments on commit d8c158e

Please sign in to comment.