Skip to content

Commit

Permalink
fix(core): fix failing port forwards on Windows in certain scenarios
Browse files Browse the repository at this point in the history
Relates to #2129
  • Loading branch information
edvald committed Nov 30, 2020
1 parent 8059741 commit c2828e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async function createProxy(garden: Garden, log: LogEntry, service: Service, spec
try {
localPort = await getPort({ host: localIp, port: spec.targetPort })
} catch (err) {
if (err.errno === "EADDRNOTAVAIL") {
if (err.errno === "EADDRNOTAVAIL" || err.errno === "EADDRINUSE") {
// If we're not allowed to bind to other 127.x.x.x addresses, we fall back to localhost. This will almost always
// be the case on Mac, until we come up with something more clever (that doesn't require sudo).
localIp = "127.0.0.1"
Expand Down

0 comments on commit c2828e3

Please sign in to comment.