Skip to content

Commit

Permalink
Fix check for pegasus-plan (#4943)
Browse files Browse the repository at this point in the history
  • Loading branch information
titodalcanton authored Nov 20, 2024
1 parent 161bcea commit 7861675
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pycbc/workflow/pegasus_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,16 @@ def add_condorpool_shared_site(sitecat, cp, local_path, local_url):
site.add_profiles(Namespace.DAGMAN, key="retry", value="2")
# Need to set PEGASUS_HOME
peg_home = which('pegasus-plan')
assert peg_home.endswith('bin/pegasus-plan')
if peg_home is None:
raise RuntimeError(
'pegasus-plan command not found. '
'Make sure Pegasus is correctly installed.'
)
if not peg_home.endswith('bin/pegasus-plan'):
raise RuntimeError(
f'path to pegasus-plan is weird: {peg_home}. '
'Make sure Pegasus is correctly installed.'
)
peg_home = peg_home.replace('bin/pegasus-plan', '')
site.add_profiles(Namespace.ENV, key="PEGASUS_HOME", value=peg_home)
sitecat.add_sites(site)
Expand Down

0 comments on commit 7861675

Please sign in to comment.