fix: aidl --checkapi fails even when old/new APIs are the same
The failure was because the return value of check_api which is bool is
returned as the exit code. Fixing the bug by returning 0 when the result
is true.
Test: aidl --checkapi build/api/test-piece-1/current.aidl
build/api/test-piece-1/current.aidl && echo success
shows "success"
Change-Id: I503b0883e2a1e7629fe68e6ec09fdf280ecdb0a2
diff --git a/main.cpp b/main.cpp
index c933ac0..ffc30a1 100644
--- a/main.cpp
+++ b/main.cpp
@@ -49,7 +49,7 @@
case Options::Task::DUMP_API:
return android::aidl::dump_api(options, io_delegate) ? 0 : 1;
case Options::Task::CHECK_API:
- return android::aidl::check_api(options, io_delegate);
+ return android::aidl::check_api(options, io_delegate) ? 0 : 1;
default:
LOG(FATAL) << "aidl: internal error" << std::endl;
return 1;