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: close patch_file before deleting it #15055

Merged
merged 1 commit into from Oct 10, 2018

Conversation

Projects
None yet
3 participants
@brenca
Member

brenca commented Oct 10, 2018

Description of Change

run_clang_format.py failed on Windows (in PowerShell) for me with the following:

Traceback (most recent call last):
  File "script/run-clang-format.py", line 337, in <module>
    sys.exit(main())
  File "script/run-clang-format.py", line 328, in main
    os.unlink(patch_file.name)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'c:\\users\\benec\\appdata\\local\\temp\\electron-format-wb6cw_'"Code not formatted correctly."

I added a .close() call, and it seems to have fixed the issue, which is weird because Windows complained that "another process" was using the file, but whatever.

Checklist
  • PR description included and stakeholders cc'd
  • npm test passes
  • PR title follows semantic commit guidelines
Release Notes

Notes: none

@brenca brenca requested a review from ckerr Oct 10, 2018

@brenca brenca requested a review from electron/reviewers as a code owner Oct 10, 2018

@MarshallOfSound

Would prefer a with openfile(thing): kind of style but looking at this code that would be a bit of a nightmare 👍

@ckerr

ckerr approved these changes Oct 10, 2018

Ahh, this was my bug. Thank you for the patch @brenca!

@ckerr

This comment has been minimized.

Show comment
Hide comment
@ckerr

ckerr Oct 10, 2018

Member

The CI failure is on an unrelated ffmpeg test.

Member

ckerr commented Oct 10, 2018

The CI failure is on an unrelated ffmpeg test.

@ckerr ckerr merged commit 2d186cb into master Oct 10, 2018

21 checks passed

Absolute Zero
Semantic Pull Request ready to be squashed
Details
WIP ready for review
Details
appveyor: win-ia32-debug AppVeyor build succeeded
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
ci/circleci: linux-arm-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-checkout Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing-tests Your tests passed on CircleCI!
Details
release-notes Release notes found

@ckerr ckerr deleted the brenca/fix-clang-format branch Oct 10, 2018

@release-clerk

This comment has been minimized.

Show comment
Hide comment
@release-clerk

release-clerk bot Oct 10, 2018

Release Notes Persisted

none

release-clerk bot commented Oct 10, 2018

Release Notes Persisted

none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment