mirror of
https://github.com/correl/melpa.git
synced 2024-11-22 19:18:39 +00:00
Check for existence of working directory when running a process
This commit is contained in:
parent
8dc0fd3a35
commit
0c167860b3
1 changed files with 2 additions and 0 deletions
|
@ -153,6 +153,8 @@ Output is written to the current buffer."
|
|||
(argv (if have-timeout
|
||||
(append (list "timeout" "-k" "60" "600" command) args)
|
||||
(cons command args))))
|
||||
(unless (file-directory-p default-directory)
|
||||
(error "Can't run process in non-existent directory: %s" default-directory))
|
||||
(let ((exit-code (apply 'process-file (car argv) nil (current-buffer) t (cdr argv))))
|
||||
(unless (zerop exit-code)
|
||||
(error "Command '%s' exited with non-zero status %d: %s"
|
||||
|
|
Loading…
Reference in a new issue