File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -507,13 +507,15 @@ def unlink(
507507 All relevant jobs get the part [[...]] removed from their name
508508 """
509509
510+ defined_jobs = None
510511 # we get the account id either from a parameter (e.g if the config file doesn't exist) or from the config file
511512 if account_id :
512513 cloud_account_id = account_id
513514 elif config :
514515 # we get the account id from the config file
515- defined_jobs = load_job_configuration (config , None ).jobs .values ()
516- cloud_account_id = list (defined_jobs )[0 ].account_id
516+ config_files , _ = resolve_file_paths (config , None )
517+ defined_jobs = load_job_configuration (config_files , None ).jobs
518+ cloud_account_id = list (defined_jobs .values ())[0 ].account_id
517519 else :
518520 raise click .BadParameter ("Either --config or --account-id must be provided" )
519521
@@ -534,6 +536,8 @@ def unlink(
534536 selected_jobs = [job for job in selected_jobs if job .environment_id in environment_id ]
535537 if identifier :
536538 selected_jobs = [job for job in selected_jobs if job .identifier in identifier ]
539+ if defined_jobs :
540+ selected_jobs = [job for job in selected_jobs if job .identifier in defined_jobs ]
537541
538542 for cloud_job in selected_jobs :
539543 current_identifier = cloud_job .identifier
You can’t perform that action at this time.
0 commit comments