Merge pull request #1155 from ledeuns/master

ping path is common to all BSDs
This commit is contained in:
Louis Lam 2022-01-10 18:20:06 +08:00 committed by GitHub
commit ccfd04a431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ function Ping(host, options) {
this._args = (options.args) ? options.args : [ "-n", "-t", timeout, "-c", "1", host ]; this._args = (options.args) ? options.args : [ "-n", "-t", timeout, "-c", "1", host ];
this._regmatch = /=([0-9.]+?) ms/; this._regmatch = /=([0-9.]+?) ms/;
} else if (util.FBSD) { } else if (util.BSD) {
this._bin = "/sbin/ping"; this._bin = "/sbin/ping";
const defaultArgs = [ "-n", "-t", timeout, "-c", "1", host ]; const defaultArgs = [ "-n", "-t", timeout, "-c", "1", host ];

View file

@ -15,7 +15,7 @@ const nodeJsUtil = require("util");
exports.WIN = /^win/.test(process.platform); exports.WIN = /^win/.test(process.platform);
exports.LIN = /^linux/.test(process.platform); exports.LIN = /^linux/.test(process.platform);
exports.MAC = /^darwin/.test(process.platform); exports.MAC = /^darwin/.test(process.platform);
exports.FBSD = /^freebsd/.test(process.platform); exports.BSD = /bsd$/.test(process.platform);
/** /**
* Init or reset JWT secret * Init or reset JWT secret