branch: elpa/emacsql commit 3d556608efb3a9c580e58a2b44c9034a90a5fe74 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
emacsql-mysql: Abort if mysql cannot be found Closes #67. --- emacsql-mysql.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacsql-mysql.el b/emacsql-mysql.el index d587ef6b14..1256728aa9 100644 --- a/emacsql-mysql.el +++ b/emacsql-mysql.el @@ -72,7 +72,8 @@ http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html") (cl-defun emacsql-mysql (database &key user password host port debug) "Connect to a MySQL server using the mysql command line program." - (let* ((mysql (executable-find emacsql-mysql-executable)) + (let* ((mysql (or (executable-find emacsql-mysql-executable) + (error "No mysql binary available, aborting"))) (command (list database "--skip-pager" "-rfBNL" mysql))) (when user (push (format "--user=%s" user) command)) (when password (push (format "--password=%s" password) command))