mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
CB-1809 create
script should print out meaningful error messages
This commit is contained in:
parent
69f11a29e1
commit
ccdd2fd2ca
@ -66,8 +66,10 @@ function createAppInfoJar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function on_error {
|
function on_error {
|
||||||
echo "An error occurred. Deleting project..."
|
echo "An unexpected error occurred: $previous_command exited with $?"
|
||||||
|
echo "Deleting project..."
|
||||||
[ -d "$PROJECT_PATH" ] && rm -rf "$PROJECT_PATH"
|
[ -d "$PROJECT_PATH" ] && rm -rf "$PROJECT_PATH"
|
||||||
|
exit "$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
function replace {
|
function replace {
|
||||||
@ -84,6 +86,7 @@ function replace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# we do not want the script to silently fail
|
# we do not want the script to silently fail
|
||||||
|
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
|
||||||
trap on_error ERR
|
trap on_error ERR
|
||||||
trap on_exit EXIT
|
trap on_exit EXIT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user