0

I tried running bundle exec create_namespace command on Ubuntu. It gives error but the exitcode = 0. Is there an alternative way to capture the failure of the bundle exec create_namespace command?

1
  • 1
    where create_namespace comes from? you can specify --verbose flag to see additional info Commented Nov 11, 2020 at 8:34

1 Answer 1

0

bundle exec executes a command in the context of the bundle (from bundle exec --help ).

If you pass a executable name that is not found, e.g. bundle exec thisisnotwhatyouarelookingfor, it will exit with a status code != 0.

"Your" command (create_namespace) must be a self-provided script, most likely something you are working on, or something located in the repository you play around with. It is then the responsability of that script to exit with the "correct" exit code.

You'd need to provide more information about your environment and that executable for people to dive into the issue. To find the executable yourself, a find . -name "create_namespace*" should point you in the right direction (most likely in ./binor./exe` if it is a gem and follows conventions).

TL;DR Most likely bundle exec does not fail (it starts the create_namespace "command" in the correct environment), but the command itself fails without setting the exit code properly.

Sign up to request clarification or add additional context in comments.

2 Comments

This helped, thank you! The issue was create_namespace command
Cool. Feel free to upvote and/or accept the answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.