Comments (6)
Fixed in in my fork at technicalpickles/thor@f85c87b. I ended up just doing a puts of the error's backtrace.
from thor.
I think it's probably acceptable, but I'm hesitant to change it. If I were fixing it myself I'd probably either show the top line of the stack trace or print the whole thing out to a log file.
from thor.
The top line of the backtrace wouldn't be sufficient in a lot of cases, I think. It's only useful if the error comes from a line in the Thorfile.
Logging it would be better, but I think it's a little overkill. If you're working on a thorfile in the current directory, and you are trying to call tasks defined in it, I really want to see backtraces that happened, and not have to know that there's an error log somewhere, and then actually open the file.
from thor.
Fwiw, I believe this was added to prevent misbehaving global Thor helpers from always bombing Thor out. Do you guys have any thoughts on making that case usable/not horrible?
from thor.
Yeah, it was added to prevent thor from exploding due to some bad files. Showing the whole backtrace would be cumbersome, +1 for showing just the first line. You can invoke thor path/to/faulty/Thorfile --debug to get the whole error (at least I hope so).
from thor.
I did what josevalim suggested. Find the commit here.
from thor.
Related Issues (20)
- How about supporting `Thor::CoreExt::HashWithIndifferentAccess#slice` method? HOT 3
- Better support for overriding options programmatically
- method_option does not correctly parsed HOT 3
- Calling `invoke` directly in RSpec breaks with required class_options, even when they are provided.
- Are there any plans to drop support for older versions of Ruby? HOT 2
- 'parse raises an error for unknown switches' test failure HOT 2
- Please Sign This Gem To Allow Verified Installations HOT 4
- Consider new release for Ruby 3.2 fixes? HOT 2
- Incorrect help for file_collision method without block HOT 2
- Default value not printed in help if option type boolean and default value is false HOT 2
- String Enums concatenate values when repeatable HOT 7
- Documentation Not Helpful HOT 5
- Wiki page for Actions has broken links to docs HOT 1
- HTTPS Issues HOT 1
- New release to fix "File unchanged!" warning? HOT 1
- directory action does not copy dotfiles HOT 1
- Commands that contain hyphens cannot be executed HOT 3
- Thor 1.3.0 No Longer calling a system exit HOT 1
- Ability to have `gsub_file` error if it didn't gsub anything
- String option is incorrectly passed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thor.