Skip to content

Commit

Permalink
fix driver detection (#1209)
Browse files Browse the repository at this point in the history
* fix driver detection

- fixes #1066

* remove unneeded variable

* 🤖

Co-authored-by: Daniel Barnes <[email protected]>
Co-authored-by: Helio Machado <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2022
1 parent c9ecc0c commit e9546a2
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions bin/cml/runner/launch.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,8 @@ const run = async (opts) => {
process.on(signal, () => shutdown({ ...opts, reason: signal }));
});

const {
driver,
workdir,
cloud,
labels,
name,
reuse,
reuseIdle,
dockerVolumes
} = opts;
const { workdir, cloud, labels, name, reuse, reuseIdle, dockerVolumes } =
opts;

await cml.repoTokenCheck();

Expand Down Expand Up @@ -375,7 +367,7 @@ const run = async (opts) => {
}

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

if (driver === 'github')
if (cml.driver === 'github')
winston.warn(
'Github Actions timeout has been updated from 72h to 35 days. Update your workflow accordingly to be able to restart it automatically.'
);
Expand Down

2 comments on commit e9546a2

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.