On 26/04/2024 18:08, Ihor Radchenko wrote:
Max Nikulin writes:

My guess is that GPLv2 BASH on macOS does not support associative
arrays. Perhaps these tests should be skipped if BASH_VERSION is not
fresh enough (not supplied by Apple).

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e4ab416fc

Feature detection should be more reliable.

;; Old GPLv2 BASH in macOSX does not support associative arrays.
(if-let ((bash (executable-find "bash")))
    (eq 0 (process-file
           bash nil nil nil
           "-c" "declare -A assoc_array")))

Even version check may be performed by shell

(if-let ((bash (executable-find "bash")))
    (eq 0 (process-file
           bash nil nil nil
           "-c" "[ ${BASH_VERSINFO[0]} -ge 4 ]")))



Reply via email to