Skip to content

Commit feb03f9

Browse files
committed
setup
1 parent e0f141a commit feb03f9

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

commit0/__main__.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
import argparse
21
import commit0.harness.run_pytest_ids
32
import commit0.harness.build
43
import commit0.harness.setup
4+
import sys
55

66

77
def main() -> None:
8-
parser = argparse.ArgumentParser(description="Commit0 version control system")
9-
parser.add_subparsers(dest="command", help="Available commands")
8+
command = sys.argv[1]
109

11-
args = parser.parse_args()
12-
13-
if args.command == "clone":
10+
if command == "clone":
1411
commit0.harness.setup.main()
15-
elif args.command == "build":
12+
elif command == "build":
1613
commit0.harness.build.main()
17-
elif args.command == "test":
14+
elif command == "test":
1815
commit0.harness.run_pytest_ids.main()
19-
else:
20-
parser.print_help()
2116

2217

2318
if __name__ == "__main__":

0 commit comments

Comments
 (0)