-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Gracefully handle error in bundle gem
#5358
Comments
This could be fixed by using Any interest in submitting a PR? |
Thanks @segiddins , I will work on that and send a PR soon. |
@segiddins While trying to debug this issue I found that this problem is related to a bug in Thor. I have opened a PR there: rails/thor#541. In order to fix the bug properly I would change both |
No, we have to wait until a Thor release upstream is made. In the meantime, we can try and wrap bundlers call with filesystem_access to provide more friendly errors |
`bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message.
`bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message.
`bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message.
`bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message.
`bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message.
…ddins [Fix #5358] Handle files conflicts when using `bundle gem` `bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message. Fixes #5358
…ddins [Fix #5358] Handle files conflicts when using `bundle gem` `bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message. Fixes #5358 (cherry picked from commit f93accc)
`bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message.
…ddins [Fix #5358] Handle files conflicts when using `bundle gem` `bundle gem` command fails with an exception when creating a gem having the same name of a file in the specified path. For instance: > touch hello > bundle gem hello This bug is due to Thor gem. At the moment, Thor does not handle conflicts between files and directories. This commit mitigates the problem by rescuing the exception from Thor and gracefully exit with an error message. Fixes rubygems/bundler#5358
Gracefully handle the fact that a file named
hello
already exist in the directory. Maybe ask user input about how to proceed. E.g. overwrite / abort.Bundler showed the unexpected error template.
I.e.
I would be happy to pick the issue if you wish. It does not seem a complex fix. What do you think?
Backtrace
Environment
The text was updated successfully, but these errors were encountered: