emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FAILED test-ob-shell/bash-uses-assoc-arrays


From: Ihor Radchenko
Subject: Re: FAILED test-ob-shell/bash-uses-assoc-arrays
Date: Sun, 28 Apr 2024 13:11:52 +0000

Max Nikulin <manikulin@gmail.com> 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 ]")))

Feel free to submit a patch.
It is a marginal improvement I will be happy to merge, if a patch is
provided.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]