diff --git a/env/rust.scm b/env/rust.scm index f6b55f2..a268188 100644 --- a/env/rust.scm +++ b/env/rust.scm @@ -180,13 +180,14 @@ function." (let* ((target (string-append (@@ (env) %env-directory) "/" (symbol->string target-sym))) - ;; TODO should actually detect if overlay is mounted not that the - ;; directory exists. - (mnt (mount-environment env #:tag onto #:target target)) + (mnt (if (environment-mounted? env) + (or (environment->overlay-mount-maybe env) + (throw 'wrong-mount?)) + (mount-environment env #:tag onto #:target target))) (mappings (append (map (remap #f) expose) (map (remap #t) share)))) (exec-in-rustup-environment '("./.cargo/bin/rust-analyzer") - #:home mnt + #:home (overlay-mount-merged mnt) #:mappings mappings) (sync) (system* "umount" target)