fixed-incorrect-template-path-handling #438
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀Fixes #437 Corrected start-project Command to Handle Template Path Properly
🔍 Issue Description
The zango start-project command was failing due to incorrect template path handling when executing the subprocess.run command. The issue was caused by inconsistent path formatting, particularly when running on Windows, where single quotes (') around the template path were causing execution errors.
The original implementation:
Problem: On Windows, using single quotes (') around paths in shell commands can cause errors.
Expected Behavior: The command should execute correctly regardless of the operating system.
✅ Solution
The fix ensures proper path formatting by replacing single quotes with double quotes ("), making it compatible with both Windows and Unix-based systems:
Why This Works?
Windows expects double quotes for file paths in shell commands.
Unix-based systems (Linux/macOS) work with both single and double quotes but handle escaping differently.
This change improves cross-platform compatibility and ensures the command runs as expected.
🛠️ Changes Made
Updated: start_project.py to properly format the --template path.
Ensured Compatibility: Works correctly across Windows, Linux, and macOS.
Tested: Successfully executed zango start-project "MyProject" without issues.