Skip to content

Fix read-only issue with Test Custom Editor file #5631

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

Closed
wants to merge 1 commit into from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented May 22, 2025

When using the "Test Custom Editor" button in the Git for Windows installer, the test file opens in read-only mode for some editors (like Helix), preventing users from editing it.

This happens because the temporary file is created by the installer with restrictive permissions. This PR adds code to explicitly set permissions on the test file using the icacls command, which grants full control to the Authenticated Users group.

The changes:

  1. Add a call to icacls after creating the test file
  2. Use the universal SID *S-1-5-11 for the Authenticated Users group
  3. Add error handling to alert users if permission setting fails

Testing the change with the Helix editor should now allow editing the test file without any read-only warnings.

Fixes #5618.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI assigned Copilot and dscho May 22, 2025
@Copilot Copilot AI changed the title [WIP] test custom editor opens a readonly file Fix read-only issue with Test Custom Editor file May 22, 2025
@Copilot Copilot AI requested a review from dscho May 22, 2025 06:58
Copilot finished work on behalf of dscho May 22, 2025 06:58
@dscho
Copy link
Member

dscho commented May 22, 2025

Unfortunately, this did not work because Copilot opened the PR in the wrong repository.

@dscho dscho closed this May 22, 2025
@dscho dscho deleted the copilot/fix-5618 branch May 22, 2025 07:42
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.

test custom editor opens a readonly file
2 participants