diff options
Diffstat (limited to 'isa')
| -rw-r--r-- | isa/isabelle-system.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/isa/isabelle-system.el b/isa/isabelle-system.el index 4ca667a8..363e9424 100644 --- a/isa/isabelle-system.el +++ b/isa/isabelle-system.el @@ -86,11 +86,9 @@ with full path." (defun isa-shell-command-to-string (command) "Like shell-command-to-string except the last character is stripped." - ;; FIXME: sometimes the command may fail. This will usually cause PG - ;; to break. Bit of an effort to trap errors here, we would need - ;; to provide some advice to shell-command-to-string to retain result - ;; of call to call-process, and raise and error in case it failed. - (substring (shell-command-to-string command) 0 -1)) + (let ((s (shell-command-to-string command))) + (if (equal (length s) 0) s + (substring s -1)))) (defun isa-getenv (envvar &optional default) "Extract an environment variable setting using the `isatool' program. |
