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 temp file handling #6703

Merged
merged 1 commit into from Mar 21, 2020
Merged

Conversation

rasjani
Copy link
Contributor

@rasjani rasjani commented Mar 18, 2020

Changelog: Bugfix: Fix check_output_runner() to handle dirs with whitespaces.
Docs: Omit

Close #6694

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

If TEMP/TMPDIR envs point to a directory that contains whitespaces, check_output_runner() fails. Generated filename needs to be quoted for it to be passed in into shell properly.

Copy link
Member

@memsharded memsharded left a comment

This fix looks OK.
It would be great to have a test that covers this case. Could you please try to add it? If you need help ask, we can give some guidance, or we can contribute the test ourselves.

Thanks for contributing this!

@rasjani
Copy link
Contributor Author

@rasjani rasjani commented Mar 18, 2020

Shouldn’t be an issue if there’s already existing tests.

@memsharded
Copy link
Member

@memsharded memsharded commented Mar 19, 2020

There is the unix_to_dos_unit_test in conans\test\unittests\util\tools_test.py, it is a bit of a mix test file, but feel free to add it there.

@jgsogo jgsogo added this to the 1.24 milestone Mar 19, 2020
@rasjani
Copy link
Contributor Author

@rasjani rasjani commented Mar 21, 2020

test added. verified on osx and fix works there at least as intended

If TEMP/TMPDIR/TMP envs point to a directory that contains whitespaces,
check_output_runner() fails. Generated filename needs to be quoted for
it to be passed in into shell properly.

Fixes conan-io#6694
@memsharded
Copy link
Member

@memsharded memsharded commented Mar 21, 2020

Excellent, many thanks!

@memsharded memsharded merged commit 5b8a1d2 into conan-io:develop Mar 21, 2020
2 checks passed
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.

3 participants