Receive base_dir as a parameter
Closed this issue · 2 comments
lprone commented
madhanl6 commented
With this change, if the user runs the script without providing a base directory argument, it will print the usage message and exit with a non-zero status code (1) to indicate an error.
madhanl6 commented
update the code like this
def main():
if len(sys.argv) < 2:
print("python script.py <base_directory>")
sys.exit(1)
base_dir = sys.argv[1]
create_project_structure(base_dir)