Comparing version 1.2.1 to 1.2.2
@@ -218,3 +218,3 @@ // Generated by CoffeeScript 1.12.7 | ||
getPort = function(appEnv) { | ||
var port, portString, ref; | ||
var e, port, portString, ref; | ||
portString = process.env.PORT || process.env.CF_INSTANCE_PORT || process.env.VCAP_APP_PORT || (appEnv != null ? (ref = appEnv.app) != null ? ref.port : void 0 : void 0); | ||
@@ -225,3 +225,8 @@ if (portString == null) { | ||
} | ||
portString = "" + (ports.getPort(appEnv.name)); | ||
try { | ||
portString = "" + (ports.getPort(appEnv.name)); | ||
} catch (error) { | ||
e = error; | ||
portString = '3000'; | ||
} | ||
} | ||
@@ -228,0 +233,0 @@ port = parseInt(portString, 10); |
@@ -5,3 +5,3 @@ { | ||
"description": "easy access to your Cloud Foundry application environment", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"author": "pmuellr", | ||
@@ -8,0 +8,0 @@ "license": "Apache-2.0", |
@@ -328,2 +328,8 @@ cfenv - easy access to your Cloud Foundry application environment | ||
**1.2.2** - 2019/03/26 | ||
- handle ports package race condition by returning port 3000 - [pr #41][] | ||
[pr #41]: https://github.com/cloudfoundry-community/node-cfenv/pull/41 | ||
**1.2.1** - 2019/03/25 | ||
@@ -330,0 +336,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78829
366
400