mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
Fix custom port number parsing... (#187)
* Fix custom port number parsing... Checking if a port was in use raised a bug where the port coming in from the command line is a string and not an int. And that was causing the check to fail. Make the port an int from the get go * Specifiy radix
This commit is contained in:
parent
fb294ab845
commit
ae08fa31d6
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ const program = require("commander");
|
|||
|
||||
program.option("--port <number>", "Specify port number").parse(process.argv);
|
||||
|
||||
const port = program.port || 3000;
|
||||
const port = parseInt(program.port, 10) || 3000;
|
||||
|
||||
console.log("Checking if port " + port + " is free...");
|
||||
tcpPortUsed.check(port, "localhost")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue