Skip to content

Commit

Permalink
Prevent creating auth files when there is no suite service directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Oct 13, 2019
1 parent 17cf578 commit 9be2602
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cylc/flow/scheduler_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,18 @@ def scheduler_cli(parser, options, args, is_restart=False):
except SuiteServiceFileError as exc:
sys.exit(exc)

suite_srv_dir = SuiteSrvFilesManager().get_suite_srv_dir(reg)

if not os.path.exists(suite_srv_dir):
sys.stderr.write(f'suite service directory not found '
f'at: {suite_srv_dir}\n')
sys.exit(1)

# Create auth files if needed.
SuiteSrvFilesManager().create_auth_files(reg)

# Extract job.sh from library, for use in job scripts.
extract_resources(
SuiteSrvFilesManager().get_suite_srv_dir(reg),
['etc/job.sh'])
extract_resources(suite_srv_dir, ['etc/job.sh'])

# Check whether a run host is explicitly specified, else select one.
if not options.host:
Expand Down

0 comments on commit 9be2602

Please sign in to comment.