diff --git a/catkin_tools/verbs/catkin_build/cli.py b/catkin_tools/verbs/catkin_build/cli.py index 6a178ec8..8f836afb 100644 --- a/catkin_tools/verbs/catkin_build/cli.py +++ b/catkin_tools/verbs/catkin_build/cli.py @@ -193,8 +193,8 @@ def main(opts): # Determine the enclosing package try: this_package = find_enclosing_package() - except InvalidPackage: - pass + except (InvalidPackage, RuntimeError): + this_package = None # Handle context-based package building if opts.build_this: