added run_id_arg to normalize_configs function call
This commit is contained in:
parent
df7adee019
commit
d7ef2e7d3a
5
main.js
5
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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue