Skip to content

Commit

Permalink
🐛 Fix copier to handle string vars with spaces in quotes (#631)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastián Ramírez <[email protected]>
  • Loading branch information
estebanx64 and tiangolo authored Mar 7, 2024
1 parent f3d6b1c commit a44d2fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .copier/update_dotenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
for key, value in answers.items():
upper_key = key.upper()
if line.startswith(f"{upper_key}="):
new_line = line.replace(line, f"{upper_key}={value}")
if " " in value:
content = f"{upper_key}={value!r}"
else:
content = f"{upper_key}={value}"
new_line = line.replace(line, content)
lines.append(new_line)
break
else:
Expand Down

2 comments on commit a44d2fd

@romea90
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good information bro!, Keep giving us the best insights
Hi, there is a new slot game that can make you a lot of profit, make a lot of money from this exciting game, are you curious? try opening this link Invy88 Good luck and don't forget to be happy

@alexcary99
Copy link

@alexcary99 alexcary99 commented on a44d2fd Mar 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enhancing the copier to handle string variables with spaces enclosed in quotes showcases a commitment to user convenience and flexibility. This update will streamline operations and improve overall usability significantly. Great improvement!

Please sign in to comment.