We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dfd137 commit f60daafCopy full SHA for f60daaf
src/sinol_make/commands/gen/gen_util.py
@@ -42,10 +42,14 @@ def get_ingen(task_id=None, ingen_path=None):
42
util.exit_with_error(f'Ingen source file for task {task_id} does not exist.')
43
44
# Sio2 first chooses shell scripts, then non-shell source codes.
45
- if os.path.splitext(ingen[0])[1] == '.sh' and len(ingen) > 1:
46
- return ingen[1]
47
- else:
48
- return ingen[0]
+ correct_ingen = None
+ for i in ingen:
+ if os.path.splitext(i)[1] == '.sh':
+ correct_ingen = i
49
+ break
50
+ if correct_ingen is None:
51
+ correct_ingen = ingen[0]
52
+ return correct_ingen
53
54
55
def compile_ingen(ingen_path: str, args: argparse.Namespace, weak_compilation_flags=False):
0 commit comments