Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Tasks In Folder With Spaces #1978

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jan 29, 2025

Description

Fixes running tasks in folders with spaces by adding an escapedDirectory method to String that escapes quotes and places the directory in quotes.

/Path " / With Folder
becomes
"/Path " / With Folder"
So it can be safely used in cd

Also updated a few git commands to correctly escape both quotes and whitespace.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Before (note the git error on top of the failed task run):
Screenshot 2025-01-29 at 4 29 21 PM

After:
Screenshot 2025-01-29 at 4 30 00 PM

Copy link
Collaborator

@0xWDG 0xWDG left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@tom-ludwig tom-ludwig left a comment

Choose a reason for hiding this comment

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

Good catch! We might want to start working on randomized tests—if we had them in place, we probably would have caught that earlier

@tom-ludwig tom-ludwig merged commit f24981a into CodeEditApp:main Jan 30, 2025
2 checks passed
@thecoolwinter
Copy link
Collaborator Author

Good catch! We might want to start working on randomized tests—if we had them in place, we probably would have caught that earlier

100% agreed. Having some tests for git would be a good idea as well. That reminds me I didn't implement any tests for this bug 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tasks break when the folder has a space in it
4 participants