remove field from errors
we have standardized on indexOf in error.message by now
This commit is contained in:
+1
-1
@@ -224,7 +224,7 @@ async function getLogs(unit, options) {
|
||||
// need to handle box.log without subdir
|
||||
if (unit === 'box') args.push(path.join(paths.LOG_DIR, 'box.log'));
|
||||
else if (unit.startsWith('crash-')) args.push(path.join(paths.CRASH_LOG_DIR, unit.slice(6) + '.log'));
|
||||
else throw new BoxError(BoxError.BAD_FIELD, 'No such unit', { field: 'unit' });
|
||||
else throw new BoxError(BoxError.BAD_FIELD, `No such unit '${unit}'`);
|
||||
|
||||
const cp = spawn('/usr/bin/tail', args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user