Skip to content

Commit

Permalink
Only raise a warning, not an error for privileged ports
Browse files Browse the repository at this point in the history
On MacOS (and on Linux if using authbind) you don't actually need
to use sudo to bind to ports < 1024, so node-foreman does not need
to raise an error if that happens. Since we can't detect if this
system will or will not require sudo we can just raise a warning.

Signed-off-by: Matthew Allan <[email protected]>
  • Loading branch information
matt-allan committed Aug 2, 2021
1 parent 782cf09 commit 70eb8e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/proc.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function start(procs, requirements, envs, portarg, emitter){
var port = parseInt(portarg);

if(port < 1024) {
return cons.Error('Only Proxies Can Bind to Privileged Ports - '+
'Try \'sudo nf start -x %s\'', port);
cons.Warn('May Not Be Able To Bind to Privileged Port - '+
'If Start Fails Try \'sudo nf start -x %s\'', port);
}


Expand Down

0 comments on commit 70eb8e0

Please sign in to comment.