Skip to content

Commit bb90cc1

Browse files
committed
more explicit debugging for unrecognized basedir
1 parent 801d0fc commit bb90cc1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

julia-repl.el

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,16 +401,20 @@ Note that ‘make-term’ surrounds this string by *'s when converted to a buffe
401401
(cl-defun julia-repl--capture-basedir (executable-path)
402402
"Attempt to obtain the Julia base directory by querying the Julia executable.
403403
404-
When NIL, this was unsuccessful."
404+
When NIL, this was unsuccessful. In this case, debug information
405+
is printed to the *Messages* buffer."
405406
(let* ((prefix "OK") ; prefix is used to verify that there was no error and help with extraction
406407
(expr (concat "print(\"" prefix
407408
"\" * normpath(joinpath(VERSION <= v\"0.7-\" ? JULIA_HOME : Sys.BINDIR, "
408409
"Base.DATAROOTDIR, \"julia\", \"base\")))"))
409410
(switches " --history-file=no --startup-file=no -qe ")
410411
(maybe-basedir (shell-command-to-string
411412
(concat executable-path switches (concat "'" expr "'")))))
412-
(when (string-prefix-p prefix maybe-basedir)
413-
(substring maybe-basedir (length prefix)))))
413+
(if (string-prefix-p prefix maybe-basedir)
414+
(substring maybe-basedir (length prefix))
415+
(progn
416+
(message "Julia basedir query returned “%s" maybe-basedir)
417+
nil))))
414418

415419
(defun julia-repl--executable-path (executable-record)
416420
"Retrun the Julia executable for the given EXECUTABLE-RECORD.

0 commit comments

Comments
 (0)