Skip to content

Commit

Permalink
Fix environment variable aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Oct 30, 2022
1 parent 17a045e commit 3becf52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const yargs = require('yargs');
const CML = require('../src/cml').default;
const { jitsuEventPayload, send } = require('../src/analytics');

const setupOpts = (opts) => {
const aliasLegacyEnvironmentVariables = () => {
const legacyEnvironmentVariables = {
TB_CREDENTIALS: 'CML_TENSORBOARD_CREDENTIALS',
DOCKER_MACHINE: 'CML_RUNNER_DOCKER_MACHINE',
Expand Down Expand Up @@ -45,7 +45,9 @@ const setupOpts = (opts) => {
process.env[key.replace(oldPrefix, newPrefix)] = process.env[key];
}
}
}

const setupOpts = (opts) => {
const { markdownfile } = opts;
opts.markdownFile = markdownfile;
opts.cml = new CML(opts);
Expand Down Expand Up @@ -117,6 +119,7 @@ const handleError = (message, error) => {
};

(async () => {
aliasLegacyEnvironmentVariables();
setupLogger({ log: 'debug' });

try {
Expand Down

2 comments on commit 3becf52

@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

@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

Please sign in to comment.