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 #268: Revert "fix #246: remove any double quotes or single quotes… #278

Merged

Conversation

mbargiel
Copy link
Contributor

… from os.tmpdir also sanitize dir option, the template option and the name option"

This reverts commit c8823e5.

Single quotes must not be removed from paths because they are valid (even if hard to use)
on all OSes. Double quotes are only disallowed on Windows, but tmp should not change any
arg it gets; instead, it should rely on the underlying fs API to fail with an error
that the user needs to fix.

…gle quotes from os.tmpdir also sanitize dir option, the template option and the name option"

This reverts commit c8823e5.

Single quotes must not be removed from paths because they are valid (even if hard to use)
on all OSes. Double quotes are only disallowed on Windows, but tmp should not change any
arg it gets; instead, it should rely on the underlying fs API to fail with an error
that the user needs to fix.
@mbargiel
Copy link
Contributor Author

I successfully verified in my project that reverting this commit fixes the regression introduced when we upgraded from 0.1.0 to 0.2.1.

@silkentrance silkentrance self-requested a review August 25, 2022 13:58
@silkentrance
Copy link
Collaborator

Thank you for the PR.

I will review the changes and then merge as this is a long standing issue.
I think I went overboard when sanitizing the name that way.

I am still wondering, though, why no CI checks have been executed.

@@ -53,35 +50,6 @@ describe('tmp', function () {
}
});
});
describe('on issue #246', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you leave these tests and make these so that they check for the presence of the single quotes and double quotes instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely! I wasn't sure which you would have preferred between simply reverting or keeping the tests but amended to serve as regression tests. I'll do this when I can, either tonight or tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see a831713.

@@ -63,39 +62,6 @@ describe('tmp', function () {
});
});
});
describe('on issue #246', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, tests must stay in place, yet test for the presence of the quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see a831713.

@silkentrance
Copy link
Collaborator

@raszi Would you be so kind to enable github actions so that we can use that for the CI instead of appveyor and travis-ci?

@silkentrance
Copy link
Collaborator

@raszi Would you be so kind to enable github projects so that we can visually manage issues in projects? That would be great!

@raszi
Copy link
Owner

raszi commented Aug 25, 2022

@raszi Would you be so kind to enable github projects so that we can visually manage issues in projects? That would be great!

Enabled.

@silkentrance
Copy link
Collaborator

@raszi Thank you.

I just looked into the cost for the github actions, I think that this is a no-go 😄

@silkentrance
Copy link
Collaborator

silkentrance commented Aug 25, 2022

Yet, Github Free includes 500GB and 2000 Minutes...
And: GitHub Actions usage is free for both public repositories

@raszi
Copy link
Owner

raszi commented Aug 25, 2022

Yet, Github Free includes 500GB and 2000 Minutes...

Yes, I believe it could work for this project, I am using that with other free projects.

@silkentrance
Copy link
Collaborator

@raszi I do not see the projects, yet.

@silkentrance silkentrance self-assigned this Aug 25, 2022
@silkentrance silkentrance added this to the 0.2.2 milestone Aug 25, 2022
@silkentrance silkentrance linked an issue Aug 25, 2022 that may be closed by this pull request
8 tasks
@silkentrance silkentrance merged commit 4c2d3f2 into raszi:master Aug 26, 2022
@mbargiel mbargiel mentioned this pull request Jan 31, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why does tmp remove quotes from paths ?
3 participants