diff --git a/tools/driver/p4c_src/main.py b/tools/driver/p4c_src/main.py index a4e0f8fe0d..633bef1dd7 100644 --- a/tools/driver/p4c_src/main.py +++ b/tools/driver/p4c_src/main.py @@ -631,7 +631,8 @@ def main(): string_to_pass_as___source_file = opts.json_source if P4_input_or_inputs_specified: - assert 1 == len(opts.P4_source_files) + if checkInput: + assert 1 == len(opts.P4_source_files) assert not JSON_input_specified string_to_pass_as___source_file = opts.P4_source_files[0]