Skip to content

Commit e9546a2

Browse files
casperdcldacbd0x2b3bfa0
authored
fix driver detection (#1209)
* fix driver detection - fixes #1066 * remove unneeded variable * 🤖 Co-authored-by: Daniel Barnes <[email protected]> Co-authored-by: Helio Machado <[email protected]>
1 parent c9ecc0c commit e9546a2

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

bin/cml/runner/launch.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,8 @@ const run = async (opts) => {
338338
process.on(signal, () => shutdown({ ...opts, reason: signal }));
339339
});
340340

341-
const {
342-
driver,
343-
workdir,
344-
cloud,
345-
labels,
346-
name,
347-
reuse,
348-
reuseIdle,
349-
dockerVolumes
350-
} = opts;
341+
const { workdir, cloud, labels, name, reuse, reuseIdle, dockerVolumes } =
342+
opts;
351343

352344
await cml.repoTokenCheck();
353345

@@ -375,7 +367,7 @@ const run = async (opts) => {
375367
}
376368

377369
if (reuseIdle) {
378-
if (driver === 'bitbucket') {
370+
if (cml.driver === 'bitbucket') {
379371
throw new Error(
380372
'cml runner flag --reuse-idle is unsupported by bitbucket'
381373
);
@@ -396,7 +388,7 @@ const run = async (opts) => {
396388
if (dockerVolumes.length && cml.driver !== 'gitlab')
397389
winston.warn('Parameters --docker-volumes is only supported in gitlab');
398390

399-
if (driver === 'github')
391+
if (cml.driver === 'github')
400392
winston.warn(
401393
'Github Actions timeout has been updated from 72h to 35 days. Update your workflow accordingly to be able to restart it automatically.'
402394
);

0 commit comments

Comments
 (0)