Skip to content

Commit 6afa2de

Browse files
committed
Remove unnecessary
1 parent b165d6d commit 6afa2de

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

bin/cml/runner.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ const shutdown = async (opts) => {
2828
tfResource,
2929
noRetry,
3030
reason,
31-
destroyDelay,
32-
single
31+
destroyDelay
3332
} = opts;
3433
const tfPath = workdir;
3534

@@ -42,13 +41,7 @@ const shutdown = async (opts) => {
4241
RUNNER && RUNNER.kill('SIGINT');
4342
winston.info('\tSuccess');
4443
} catch (err) {
45-
if (single) {
46-
winston.warn(
47-
`\tFailed: Runner in --single mode, might have cleared itself.`
48-
);
49-
} else {
50-
winston.error(`\tFailed: ${err.message}`);
51-
}
44+
winston.error(`\tFailed: ${err.message}`);
5245
}
5346
};
5447

src/cml.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class CML {
340340

341341
async unregisterRunner(opts = {}) {
342342
const { id: runnerId } = (await this.runnerByName(opts)) || {};
343-
if (!runnerId) throw new Error(`Runner with id ${runnerId} not found`);
343+
if (!runnerId) throw new Error(`Runner not found`);
344344

345345
return await getDriver(this).unregisterRunner({ runnerId, ...opts });
346346
}

0 commit comments

Comments
 (0)