Skip to content

Commit

Permalink
fix(serve): improve error message when port is in use (#4167)
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman authored and hansl committed Jan 24, 2017
1 parent 23c6c53 commit 75e83a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/angular-cli/commands/serve.run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function checkExpressPort(commandOptions: ServeTaskOptions) {
.then((foundPort: number) => {

if (commandOptions.port !== foundPort && commandOptions.port !== 0) {
throw new SilentError(`Port ${commandOptions.port} is already in use.`);
throw new SilentError(
`Port ${commandOptions.port} is already in use. Use '--port' to specify a different port.`
);
}

// otherwise, our found port is good
Expand Down

0 comments on commit 75e83a4

Please sign in to comment.