From 3c125e241422a0eab96d2fbc1e3ff41b65d211cf Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 18 Jan 2026 20:49:29 +0100 Subject: [PATCH] Portable escape SWITCHES in 'package-review-diff-command' * lisp/emacs-lisp/package.el (package-review-diff-command): Use 'shell-quote-argument' to quote arguments instead of assuming a POSIX shell. --- lisp/emacs-lisp/package.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 758fdf199cf..5e51b5bd647 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -710,13 +710,14 @@ case you are concerned about moving files between file systems." (defcustom package-review-diff-command (cons diff-command - '("-u" ;unified patch formatting - "-N" ;treat absent files as empty - "-x" "'*.elc'" ;ignore byte compiled files - "-x" "'*-autoloads.el'" ;ignore the autoloads file - "-x" "'*-pkg.el'" ;ignore the package description - "-x" "'*.info'" ;ignore compiled Info files - )) + (mapcar #'shell-quote-argument + '("-u" ;unified patch formatting + "-N" ;treat absent files as empty + "-x" "*.elc" ;ignore byte compiled files + "-x" "*-autoloads.el" ;ignore the autoloads file + "-x" "*-pkg.el" ;ignore the package description + "-x" "*.info" ;ignore compiled Info files + ))) "Configuration of how `package-review' should generate a Diff. The structure of the value must be (COMMAND . OPTIONS), where `diff-command' is rebound to be COMMAND and OPTIONS are command-line