Skip to content

Commit 1f909fc

Browse files
committed
fix: Handle list --detailed command with 3 arguments
The list --detailed command was being rejected because when sys.argv has 3 elements, it was falling into the wrong conditional branch. Added explicit handling for the list --detailed case when len(sys.argv) == 3.
1 parent 25b3404 commit 1f909fc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

reComputer/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ def run_script():
3737
elif sys.argv[1] == "clean":
3838
example_name = sys.argv[2]
3939
subprocess.run(["bash", path_of_script("clean.sh"), example_name], env=env)
40+
elif sys.argv[1] == "list" and sys.argv[2] == "--detailed":
41+
# Run the table generator script
42+
script_path = path_of_script("generate_example_table.py")
43+
if os.path.exists(script_path):
44+
subprocess.run(["python3", script_path])
45+
else:
46+
print("Detailed table generator not found")
4047
else:
4148
print("Only Support `run` or `clean` for now. try `reComputer run llava` .")
4249
elif len(sys.argv) == 2:

0 commit comments

Comments
 (0)