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

Only check for username and password if driver type is mysql #54

Merged
merged 2 commits into from Jan 6, 2019

Conversation

Projects
None yet
2 participants
@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented Jan 5, 2019

If you choose sqlite and go through the configure process and then try to start you get this:

2019/01/05 20:22:20 Initializing...
2019/01/05 20:22:20 Loading config.ini configuration...
2019/01/05 20:22:20 Loading templates...
2019/01/05 20:22:20 Loading pages...
2019/01/05 20:22:20 Loading user pages...
2019/01/05 20:22:20 Loading encryption keys...
ERROR: 2019/01/05 20:22:20 log.go:26: Database user or password not set.

Workaround is to set a username and password even though not needed. This changes the check to only apply if the driver is mysql

geekgonecrazy and others added some commits Jan 5, 2019

@thebaer

This comment has been minimized.

Copy link
Member

thebaer commented Jan 5, 2019

Good catch! Thanks for fixing this.

I made just one change: to use the constants we have set up for the different db drivers, since we should've been doing that already.

Otherwise the patch looks good to me -- we just need to get your signature on the CLA and then we'll merge it!

@geekgonecrazy

This comment has been minimized.

Copy link
Contributor

geekgonecrazy commented Jan 6, 2019

Ah didn't even see the constants or would have included. 👍

Signed CLA! 😄

@thebaer

This comment has been minimized.

Copy link
Member

thebaer commented Jan 6, 2019

No worries -- thanks again!

@thebaer thebaer merged commit 0cf1d13 into writeas:master Jan 6, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@geekgonecrazy geekgonecrazy deleted the geekgonecrazy:sqlite3-user-password branch Jan 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment