We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9605ab5 commit ca67125Copy full SHA for ca67125
1 file changed
pythoncms/cli.py
@@ -41,7 +41,9 @@ 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.abspath(name)
+ # Use PWD environment variable if available to handle deleted CWD
45
+ base_dir = os.environ.get("PWD") or os.getcwd()
46
+ dest = os.path.join(base_dir, name)
47
48
if os.path.exists(dest):
49
click.echo(f"Error: Directory {name} already exists.")
0 commit comments