include badly spelled error message in logic
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
b8d0129ae4
commit
b13184b02a
|
|
@ -29,9 +29,9 @@ class NVMEoF {
|
||||||
nvmeof.logger = nvmeof.options.logger;
|
nvmeof.logger = nvmeof.options.logger;
|
||||||
} else {
|
} else {
|
||||||
nvmeof.logger = console;
|
nvmeof.logger = console;
|
||||||
console.verbose = function() {
|
console.verbose = function () {
|
||||||
console.log(...arguments);
|
console.log(...arguments);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,9 +122,11 @@ class NVMEoF {
|
||||||
try {
|
try {
|
||||||
await nvmeof.exec(nvmeof.options.paths.nvme, args);
|
await nvmeof.exec(nvmeof.options.paths.nvme, args);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
// already connnected - is mispelled in older versions so we include both
|
||||||
if (
|
if (
|
||||||
err.stderr &&
|
err.stderr &&
|
||||||
(err.stderr.includes("already connected") ||
|
(err.stderr.includes("already connected") ||
|
||||||
|
err.stderr.includes("already connnected") ||
|
||||||
err.stderr.includes("Operation already in progress"))
|
err.stderr.includes("Operation already in progress"))
|
||||||
) {
|
) {
|
||||||
// idempotent
|
// idempotent
|
||||||
|
|
@ -279,9 +281,7 @@ class NVMEoF {
|
||||||
async pathExists(path) {
|
async pathExists(path) {
|
||||||
const nvmeof = this;
|
const nvmeof = this;
|
||||||
try {
|
try {
|
||||||
await nvmeof.exec("stat", [
|
await nvmeof.exec("stat", [path]);
|
||||||
path,
|
|
||||||
]);
|
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue