Merge pull request #5 from juergenhoetzel/locale

Use C locale for external processes to prevent parsing issues
This commit is contained in:
Lucien Cartier-Tilet 2021-05-02 18:14:17 +02:00 committed by GitHub
commit bb7cf0eab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ neither of these, an error will be thrown by the function."
"Detect mounted partitions on the system.
Return detected partitions as a list of structs."
(let ((partitions (split-string (shell-command-to-string "df -lH") (regexp-quote "\n") t)))
(let ((partitions (split-string (shell-command-to-string "LANG=C df -lH") (regexp-quote "\n") t)))
(-keep (lambda (partition)
(let* ((partition (split-string partition " " t))
(filesystem (nth 0 partition))
@ -349,7 +349,7 @@ If RELEASE-FILE is nil, use '/etc/os-release'."
(memory (-map (lambda (line)
(s-split " " line t))
(s-split "\n"
(shell-command-to-string "free -b | tail -2")
(shell-command-to-string "LANG=C free -b | tail -2")
t)))
(ram (nth 0 memory))
(swap (nth 1 memory))