Skip to content
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

Enable only when options are found #235

Merged
merged 2 commits into from
Mar 8, 2017

Conversation

kawakubox
Copy link
Contributor

@kawakubox kawakubox commented Dec 26, 2016

Issue

Can't use help command #234

Description

The thor implements disable_class_options at this commit. rails/thor@eda9080

So --log_level and --color options are disappeared from help sub-command.

I tried to bypass logger configuration when class options not found.

Is this Pull Request correct ??

@ryotarai
Copy link
Member

Hmm...does this mean help command doesn't show class options?
I think it is better to stop using class_option and define options like define_exec_options

@kawakubox
Copy link
Contributor Author

Hmm...does this mean help command doesn't show class options?

Yes, All class_options are excluded, when execute help command.

see) https://github.com/erikhuda/thor/pull/462/files#diff-97da1134065a597e5d8c72f9c597b08eR478

I think it is better to stop using class_option and define options like define_exec_options

Oh,,, I see.

@kawakubox
Copy link
Contributor Author

I fixed the advice.

6f33bbe


$ bundle exec itamae
Commands:
  itamae destroy [cookbook|role] [NAME]   # Undo role or cookbook (short-cut alias: "d")
  itamae docker RECIPE [RECIPE...]        # Create Docker image
  itamae generate [cookbook|role] [NAME]  # Initialize role or cookbook (short-cut alias: "g")
  itamae help [COMMAND]                   # Describe available commands or one specific command
  itamae init NAME                        # Create a new project
  itamae local RECIPE [RECIPE...]         # Run Itamae locally
  itamae ssh RECIPE [RECIPE...]           # Run Itamae via ssh
  itamae version                          # Print version
$ bundle exec itamae help ssh
Usage:
  itamae ssh RECIPE [RECIPE...]

Options:
      [--recipe-graph=PATH]                            # [EXPERIMENTAL] Write recipe dependency graph in DOT
  -j, [--node-json=NODE_JSON]
  -y, [--node-yaml=NODE_YAML]
  -n, [--dry-run], [--no-dry-run]
      [--shell=SHELL]
                                                       # Default: /bin/sh
      [--login-shell], [--no-login-shell]
      [--ohai], [--no-ohai]                            # This option is DEPRECATED and will be unavailable.
      [--profile=PATH]                                 # [EXPERIMENTAL] Save profiling data
      [--detailed-exitcode], [--no-detailed-exitcode]  # exit code 0 - The run succeeded with no changes or failures, exit code 1 - The run failed, exit code 2 - The run succeeded,and some resources were changed
  -l, [--log-level=LOG_LEVEL]
                                                       # Default: info
      [--color], [--no-color]
                                                       # Default: true
  -c, [--config=CONFIG]
  -h, [--host=HOST]
  -u, [--user=USER]
  -i, [--key=KEY]
  -p, [--port=N]
      [--ssh-config=SSH_CONFIG]
      [--vagrant], [--no-vagrant]
      [--ask-password], [--no-ask-password]
      [--sudo], [--no-sudo]
                                                       # Default: true

@ryotarai ryotarai merged commit 89bf008 into itamae-kitchen:master Mar 8, 2017
@ryotarai
Copy link
Member

ryotarai commented Mar 8, 2017

released in v1.9.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants