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

Yes to all questions option #10

Open
isoutham opened this issue Oct 22, 2013 · 1 comment
Open

Yes to all questions option #10

isoutham opened this issue Oct 22, 2013 · 1 comment

Comments

@isoutham
Copy link
Contributor

In deploy

@sbotman
Copy link
Contributor

sbotman commented Oct 22, 2013

Ian, this might help you. Within the knife cs plugin, they used the following function.

def confirm_action(question)
  return true if locate_config_value(:yes)
  result = ui.ask_question(question, :default => "Y" )
  if result == "Y" || result == "y" then
    return true
  else
    return false
  end
end

So within the ui object you will find the ask method which you might want to reuse for this.
And I believe the config[:yes] is inherited by knife, so no need to do something extra for that (if I remember well ;)

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

No branches or pull requests

2 participants