Merge pull request #5 from juergenhoetzel/locale
Use C locale for external processes to prevent parsing issues
This commit is contained in:
commit
bb7cf0eab4
@ -142,7 +142,7 @@ neither of these, an error will be thrown by the function."
|
|||||||
"Detect mounted partitions on the system.
|
"Detect mounted partitions on the system.
|
||||||
|
|
||||||
Return detected partitions as a list of structs."
|
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)
|
(-keep (lambda (partition)
|
||||||
(let* ((partition (split-string partition " " t))
|
(let* ((partition (split-string partition " " t))
|
||||||
(filesystem (nth 0 partition))
|
(filesystem (nth 0 partition))
|
||||||
@ -349,7 +349,7 @@ If RELEASE-FILE is nil, use '/etc/os-release'."
|
|||||||
(memory (-map (lambda (line)
|
(memory (-map (lambda (line)
|
||||||
(s-split " " line t))
|
(s-split " " line t))
|
||||||
(s-split "\n"
|
(s-split "\n"
|
||||||
(shell-command-to-string "free -b | tail -2")
|
(shell-command-to-string "LANG=C free -b | tail -2")
|
||||||
t)))
|
t)))
|
||||||
(ram (nth 0 memory))
|
(ram (nth 0 memory))
|
||||||
(swap (nth 1 memory))
|
(swap (nth 1 memory))
|
||||||
|
Loading…
Reference in New Issue
Block a user