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

Use the correct environment variable for defaults on Windows #470

Merged
merged 1 commit into from
Nov 20, 2013

Conversation

Brar
Copy link
Contributor

@Brar Brar commented Nov 20, 2013

Windows uses the USERNAME environment variable instead of the USER environment variable for the current user so the default for pg doesn't work on windows.
This tiny patch gets this right.
I've opted for process.platform instead of os.platform() as I didn't want to introduce a require('os') into defaults.js but if using one or the other is more than a matter of taste (which I don't think) yout migth want to use os.platform() instead.
Didn't test anything but Windows but I don't expect any problems with this two-liner.

Regards,
Brar

…nv.USER as default value for user and database on Windows platforms
@brianc
Copy link
Owner

brianc commented Nov 20, 2013

Nice - I appreciate this. Kinda funny travis failed on it....looks like there's a problem with my build script. Anyways, thanks! 👍

brianc added a commit that referenced this pull request Nov 20, 2013
Use the correct environment variable for defaults on Windows
@brianc brianc merged commit 4b640ca into brianc:master Nov 20, 2013
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