Browse Source

Resolve symlinks when connecting Indium

Fix GitHub issue #204

* indium-interaction.el (indium-connect, indium-launch): Use `file-truename' to
  resolve the current directory so that the project root is set to a canonical
  directory paph.
pull/10/head
Nicolas Petton 9 months ago
parent
commit
aafb117d13
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      indium-interaction.el

+ 8
- 2
indium-interaction.el View File

@@ -51,7 +51,7 @@
(interactive)
(indium-maybe-quit)
(unless (indium-client-process-live-p)
(let ((dir (expand-file-name default-directory)))
(let ((dir (indium-interaction--current-directory)))
(indium-client-start
(lambda ()
(indium-client-list-configurations
@@ -66,7 +66,7 @@
(interactive)
(indium-maybe-quit)
(unless (indium-client-process-live-p)
(let ((dir (expand-file-name default-directory)))
(let ((dir (indium-interaction--current-directory)))
(indium-client-start
(lambda ()
(indium-client-list-configurations
@@ -422,6 +422,12 @@ hitting a breakpoint."
(when (indium-breakpoint-at-point)
(user-error "There is already a breakpoint on the current line")))

(defun indium-interaction--current-directory ()
"Return the true name of the current directory.

For the project root to be correctly set, symlinks are resolved."
(file-truename default-directory))

(add-hook 'kill-buffer-hook #'indium-interaction-kill-buffer)

(provide 'indium-interaction)


Loading…
Cancel
Save