Skip to content

Commit 5e099a6

Browse files
jcs090218ubolonton
authored andcommitted
Fix gzip error on Windows
emacs-tree-sitter/elisp-tree-sitter#89 * Use tar command if failed. * Wrap with shell quote for security * Propos use shell-command instead of tar-mode. * Update to use ts-lang--call
1 parent a75d852 commit 5e099a6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tree-sitter-langs-build.el

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,7 @@ non-nil."
339339
;; FIX: Handle HTTP errors properly.
340340
(url-copy-file (tree-sitter-langs--bundle-url version os)
341341
bundle-file 'ok-if-already-exists)
342-
(with-temp-buffer
343-
(insert-file-contents bundle-file)
344-
(tar-mode)
345-
(tar-untar-buffer))
342+
(tree-sitter-langs--call "tar" "-xvzf" bundle-file)
346343
;; FIX: This should be a metadata file in the bundle itself.
347344
(with-temp-file tree-sitter-langs--bundle-version-file
348345
(let ((coding-system-for-write 'utf-8))

0 commit comments

Comments
 (0)