We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48617dd commit f1ce670Copy full SHA for f1ce670
1 file changed
pythoncms/cli.py
@@ -41,7 +41,13 @@ def cli():
41
@click.option("--run", is_flag=True, help="Initialize and run the server immediately")
42
def start(name, run):
43
"""Create a new pythoncms project"""
44
- dest = os.path.join(os.getcwd(), name)
+ try:
45
+ current_dir = Path.cwd()
46
+ except FileNotFoundError:
47
+ click.echo("Error: The current working directory does not exist. Please change to a valid directory.")
48
+ return
49
+
50
+ dest = os.path.join(str(current_dir), name)
51
52
if os.path.exists(dest):
53
click.echo(f"Error: Directory {name} already exists.")
0 commit comments