Skip to content

Prompt for PostgreSQL username and password instead of using configuration, and check that the user exists #7

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

krisalyssa
Copy link

The one thing I’m not happy with is lines 34-36. I don’t know how to properly report an error, so I’m just printing to stdout and exiting.

Craig S. Cottingham added 3 commits April 11, 2012 23:52
…_file to callback

Signed-off-by: Craig S. Cottingham <craig.cottingham@hrworx.com>
Signed-off-by: Craig S. Cottingham <craig.cottingham@hrworx.com>
@@ -16,6 +29,11 @@
task :populate => :sample
end
RUBY
end
rescue PG::Error => err
# surely there's a better way to report errors than this....
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps put the ask_wizard in a while loop until they give valid credentials?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe. It doesn’t help when there are no valid credentials, but making the user ctrl-C or switch to another command prompt to create the user isn’t any worse than this.

Signed-off-by: Craig S. Cottingham <craig.cottingham@hrworx.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants