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

README: Add instructions on how to create an empty zip file #4128

Merged
merged 4 commits into from
Jan 5, 2025

Conversation

FichteFoll
Copy link
Collaborator

Since I just had to do this and it's not as straight forward as you'd expect, I added instructions for this to the README, seeing how this repo is the only one where such a hack would be relevant.

No changes outside of whitespace.
None for Windows because I don't know a simple command for this and
cannot experiment either.
@FichteFoll FichteFoll force-pushed the pr/empty-zip-instructions branch from f9e69bc to e0ea39b Compare January 4, 2025 19:50
@deathaxe
Copy link
Collaborator

deathaxe commented Jan 4, 2025

Wouldn't it be easier to just provide a utility command which creates an empty override of given default packages? Sound's like something being in scope of Package Control, OverrideAudit or PackageDev.

@FichteFoll
Copy link
Collaborator Author

Would it be easier? Maybe, but since we currently have instructions on how to symlink individual packages of this repo into your ST Packages dir, it also makes sense to have the empty zip file trick in here.

keith-hall
keith-hall previously approved these changes Jan 4, 2025
@deathaxe
Copy link
Collaborator

deathaxe commented Jan 4, 2025

  1. Using the echo command prints plain text to the file on both cygwin bash and WSL bash causing the file not being a valid zip.

    The following works however

    printf "PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" > empty.zip
  2. Why not creating empty packages directly? They are small enough to not justify additional complexity by creating symlinks. A tiny batchfile/script create_dummy <package> would do.

  3. I know the reason, but still not a fan of this broken line style, but if we want to change it, whole file should follow same style. I wouldn't introduce mixed writing/line styles.

@FichteFoll
Copy link
Collaborator Author

The following works however

Thanks for checking. I'll adopt that since it's more portable.

Why not creating empty packages directly? They are small enough to not justify additional complexity by creating symlinks.

I mentioned a reason in the text: to make them stand out. Of course, this is an optional thing, so I will emphasise this fact more, but at least for me on Linux it feels more natural (and has symmetry with the Packages folder).

whole file should follow same style. I wouldn't introduce mixed writing/line styles.

Since I'm an advocator of this style, I'll gladly make the change if we can largely agree on it. In a separate PR, however.

@FichteFoll FichteFoll merged commit c2e6bf8 into sublimehq:master Jan 5, 2025
@FichteFoll FichteFoll deleted the pr/empty-zip-instructions branch January 5, 2025 10:59
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.

4 participants