summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryanchith <yanchi.toth@gmail.com>2022-08-25 14:23:08 +0200
committeryanchith <yanchi.toth@gmail.com>2022-08-25 14:23:08 +0200
commitfaf6d98b3e2a386f3f37079f9bb6de11a7bce6cc (patch)
tree458609a15d8bb343d1707d9b24d87dfeeaf97248
parent894487d44c1664a9005cafd625fa99b54ff66c85 (diff)
downloadrust-mode-faf6d98b3e2a386f3f37079f9bb6de11a7bce6cc.tar.gz
Make compilation buffer workspace-aware
This fixes incorrect paths for workspace projects when running starting compilation from a source file instead of the project root.
-rw-r--r--rust-cargo.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust-cargo.el b/rust-cargo.el
index 0c35ddb..75f9c16 100644
--- a/rust-cargo.el
+++ b/rust-cargo.el
@@ -44,7 +44,7 @@
(setq-local process-environment env)
;; Set PATH so we can find cargo.
(setq-local exec-path path)
- (let ((ret (call-process rust-cargo-bin nil t nil "locate-project")))
+ (let ((ret (process-file rust-cargo-bin nil (list (current-buffer) nil) nil "locate-project" "--workspace")))
(when (/= ret 0)
(error "`cargo locate-project' returned %s status: %s" ret (buffer-string)))
(goto-char 0)