File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 1
- import argparse
2
1
import commit0 .harness .run_pytest_ids
3
2
import commit0 .harness .build
4
3
import commit0 .harness .setup
4
+ import sys
5
5
6
6
7
7
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 ]
10
9
11
- args = parser .parse_args ()
12
-
13
- if args .command == "clone" :
10
+ if command == "clone" :
14
11
commit0 .harness .setup .main ()
15
- elif args . command == "build" :
12
+ elif command == "build" :
16
13
commit0 .harness .build .main ()
17
- elif args . command == "test" :
14
+ elif command == "test" :
18
15
commit0 .harness .run_pytest_ids .main ()
19
- else :
20
- parser .print_help ()
21
16
22
17
23
18
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments