Skip to content

Commit

Permalink
Fixed --port CLI option not working (among possibly others)
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Oct 19, 2012
1 parent 275c71f commit cc2087a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -62,7 +62,7 @@
"bal-util": ">=1.13.8 <1.14",
"caterpillar": "1.1.x",
"coffee-script": "1.3.x",
"commander": "0.6.x",
"commander": "1.0.x",
"cson": "1.2.x",
"express": "3.0.x",
"growl": "1.4.x",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/docpad.coffee
Expand Up @@ -814,7 +814,7 @@ class DocPad extends EventEmitterEnhanced

# Get environments
@initialConfig.port ?= process.env.PORT ? process.env.VCAP_APP_PORT ? process.env.VMC_APP_PORT ? 9778
@initialConfig.env ?= process.env.NODE_ENV or 'development'
@initialConfig.env or= process.env.NODE_ENV or 'development'
@config.env = @instanceConfig.env or @websiteConfig.env or @websitePackageConfig.env or @initialConfig.env
envs = @getEnvironments()

Expand Down
4 changes: 2 additions & 2 deletions src/lib/interfaces/console.coffee
Expand Up @@ -241,12 +241,12 @@ class ConsoleInterface

# Apply global configuration
for own key, value of commanderConfig
if sourceConfig[key]?
if typeof sourceConfig[key] isnt 'undefined'
config[key] = value

# Apply custom configuration
for own key, value of customConfig
if sourceConfig[key]?
if typeof sourceConfig[key] isnt 'undefined'
config[key] = value

# Return config object
Expand Down

0 comments on commit cc2087a

Please sign in to comment.