diff --git a/log b/log index e69de29..956f5d4 100644 --- a/log +++ b/log @@ -0,0 +1 @@ +RUN ID VALUE FOR CONFIG:undefined diff --git a/main.js b/main.js index fe86e70..723bc48 100644 --- a/main.js +++ b/main.js @@ -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"); } diff --git a/normalize-config.js b/normalize-config.js index 6fe961a..caa60a8 100644 --- a/normalize-config.js +++ b/normalize-config.js @@ -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);