added run_id_arg to normalize_configs function call

This commit is contained in:
worm 2023-01-02 13:42:46 -08:00
parent df7adee019
commit d7ef2e7d3a
3 changed files with 5 additions and 3 deletions

1
log
View file

@ -0,0 +1 @@
RUN ID VALUE FOR CONFIG:undefined

View file

@ -1,7 +1,7 @@
import { normalized_config } from "./normalize-config.js";
import { get_run_details } from "./tfc-api-functions.mjs";
const my_config = normalized_config;
const my_config = await normalized_config;
const runid_provided = run_id => {
return (run_id ? true : false);
@ -11,7 +11,8 @@ const runidNotProvided = run_id => {
return !runid_provided(run_id);
}
if(runidNotProvided(process.argv[2])){
if(runidNotProvided(my_config.run_id)){
console.log(`RUN ID VALUE FOR CONFIG:${my_config.run_id}`);
throw new Error("RunID must be provided");
}

View file

@ -13,5 +13,5 @@ const run_id_arg = process.argv[2];
return config
}
export const normalized_config = await normalize_configs(default_token, default_base_url, default_download_dir);
export const normalized_config = await normalize_configs(default_token, default_base_url, default_download_dir, run_id_arg);