-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The namespaces don't work as documented #792
Comments
+1 |
Is anybody even looking at these tickets? |
Renaming the file to require 'thor'
require 'dotenv'
Dotenv.load
module Db
class Ops < Thor
namespace :db
def self.exit_on_failure?
true
end
desc 'dump', 'dumps the database using pgdump'
def backup
puts 'Backup'
end
desc 'restore', 'loads the database from pgdump'
def restore
puts 'restore'
end
end
end
module Docker
class Commands < Thor
namespace :docker
desc 'start', 'starts docker compose'
def start; end
end
end Outputs:
I'm not sure what the expected behaviour is for the original example file. |
Hmm, this also how the https://github.com/rails/thor/blob/5fb6206a6d2d7bfb40bcb851c2e118ba39f69757/spec/fixtures/help.thor is implemented so I guess this is a bug. |
See the following gist https://gist.github.com/timuckun/4b1e8f860cd47e0dc27423cad9563f4d
Calling this file results in this output (notice the lack of namespaces)
The text was updated successfully, but these errors were encountered: