Skip to content

Commit

Permalink
HARMONY-1764: Add --harmony-input-file flag for passing large operations
Browse files Browse the repository at this point in the history
  • Loading branch information
indiejames committed May 16, 2024
1 parent d3fb928 commit c1c1687
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion harmony/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,16 @@ def run_cli(parser, args, AdapterClass, cfg=None):
if args.harmony_wrap_stdout:
setup_stdout_log_formatting(cfg)

# read in the operation file passed in with --harmony-input-file if any
if bool(args.harmony_input_file):
with open(args.harmony_input_file, 'r') as f:
args.harmony_input = f.read()

if args.harmony_action == 'invoke':
start_time = datetime.datetime.now()
if not bool(args.harmony_input):
parser.error(
'--harmony-input must be provided for --harmony-action=invoke')
'--harmony-input or --harmony-input-file must be provided for --harmony-action=invoke')
elif not bool(args.harmony_sources):
successful = _invoke_deprecated(AdapterClass, args.harmony_input, cfg)
if not successful:
Expand Down

0 comments on commit c1c1687

Please sign in to comment.