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

Command line utility lacks update command #317

Closed
navid-zamani opened this issue Jul 15, 2024 · 1 comment
Closed

Command line utility lacks update command #317

navid-zamani opened this issue Jul 15, 2024 · 1 comment

Comments

@navid-zamani
Copy link

Right now, when I want to patch a single file in an archive, I have to unpack the entire archive, patch the file, and then pack it again. This takes an unreasonable amount of time.

Most tools have an update command, to allows one to save all but the necessary work. E.g. ar already has this, as do tar (with compression too) and zip.

It would be nice, if asar had this too, if it is easy to implement and not a lot of work, and if it doesn’t extract the archive internally anyway and saves time/resources.

Here’s my use case, which changes the key mapping in Signal Desktop’s asar file:

npx asar extract "$asar" "$tmp"
sed -ri 's/key:( *)13,/key:\113,\1ctrlKey:\1true,/g' \
    "$tmp/ts/components/CompositionInput.js" \
    "$tmp/preload.bundle.js"
sed -ri 's/\*in//g' \
    "$tmp/_locales/de/messages.json"
npx asar pack "$tmp" "$geheilt"
rm -rf "$tmp"
@MarshallOfSound
Copy link
Member

This is not an intended / supported usecase of the asar command, we're a file format used by developers not by end users who wish to modify other ASARs. As you note it's currently possible, but we probably won't invest any resources in making it easier via an update command or the like.

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

No branches or pull requests

3 participants