Skip to content

Commit

Permalink
fix: default options order
Browse files Browse the repository at this point in the history
  • Loading branch information
device25 committed Mar 26, 2018
1 parent c7dd058 commit 912b485
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Connection options:
const opt = docopt(doc, { version: packagejson.version });

const options = {
database: opt['--db'] || process.env.PGDATABASE || process.env.POSTGRES_DB,
host: opt['--host'] || process.env.PGHOST || process.env.POSTGRES_HOST || 'localhost',
port: opt['--port'] || process.env.PGPORT || process.env.POSTGRES_PORT || 5432,
user: opt['--user'] || process.env.PGUSER || process.env.POSTGRES_USER,
password: opt['--password'] || process.env.PGPASSWORD || process.env.POSTGRES_PASSWORD,
database: process.env.PGDATABASE || process.env.POSTGRES_DB || opt['--db'],
host: process.env.PGHOST || process.env.POSTGRES_HOST || opt['--host'],
port: process.env.PGPORT || process.env.POSTGRES_PORT || opt['--port'],
user: process.env.PGUSER || process.env.POSTGRES_USER || opt['--user'],
password: process.env.PGPASSWORD || process.env.POSTGRES_PASSWORD || opt['--password'],
migrationsSchema: opt['--migrations-schema'],
migrationsTable: opt['--migrations-table'],
migrationsDir: opt['--migrations-dir'],
Expand Down
27 changes: 16 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ acorn@^4.0.3:
version "4.0.13"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"

acorn@^5.4.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298"
acorn@^5.5.0:
version "5.5.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"

ajv-keywords@^2.1.0:
version "2.1.1"
Expand Down Expand Up @@ -2024,9 +2024,9 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"

eslint@4.18.2:
version "4.18.2"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.18.2.tgz#0f81267ad1012e7d2051e186a9004cc2267b8d45"
eslint@4.19.1:
version "4.19.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
Expand All @@ -2037,7 +2037,7 @@ eslint@4.18.2:
doctrine "^2.1.0"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
espree "^3.5.2"
espree "^3.5.4"
esquery "^1.0.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
Expand All @@ -2059,18 +2059,19 @@ eslint@4.18.2:
path-is-inside "^1.0.2"
pluralize "^7.0.0"
progress "^2.0.0"
regexpp "^1.0.1"
require-uncached "^1.0.3"
semver "^5.3.0"
strip-ansi "^4.0.0"
strip-json-comments "~2.0.1"
table "4.0.2"
text-table "~0.2.0"

espree@^3.5.2:
version "3.5.3"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6"
espree@^3.5.4:
version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
dependencies:
acorn "^5.4.0"
acorn "^5.5.0"
acorn-jsx "^3.0.0"

esprima@^4.0.0:
Expand Down Expand Up @@ -4434,6 +4435,10 @@ regex-not@^1.0.0:
dependencies:
extend-shallow "^2.0.1"

regexpp@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.0.1.tgz#d857c3a741dce075c2848dcb019a0a975b190d43"

regexpu-core@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
Expand Down

0 comments on commit 912b485

Please sign in to comment.