[gnome-builder] rust: setup PATH for rustc access when necessary
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] rust: setup PATH for rustc access when necessary
- Date: Thu, 30 Mar 2017 02:30:20 +0000 (UTC)
commit bef2f9de336d106571625d4786dbc23723c36b6e
Author: Christian Hergert <chergert redhat com>
Date: Wed Mar 29 19:56:56 2017 -0600
rust: setup PATH for rustc access when necessary
plugins/rust-langserv/rust_langserv_plugin.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/rust-langserv/rust_langserv_plugin.py b/plugins/rust-langserv/rust_langserv_plugin.py
index 49cbb05..4955534 100644
--- a/plugins/rust-langserv/rust_langserv_plugin.py
+++ b/plugins/rust-langserv/rust_langserv_plugin.py
@@ -89,7 +89,9 @@ class RustService(Ide.Object, Ide.Service):
# If rls was installed with Cargo, try to discover that
# to save the user having to update PATH.
path_to_rls = os.path.expanduser("~/.cargo/bin/rls")
- if not os.path.exists(path_to_rls):
+ if os.path.exists(path_to_rls):
+ launcher.setenv('PATH', os.path.expanduser("~/.cargo/bin"), True)
+ else:
path_to_rls = "rls"
# Setup our Argv. We want to communicate over STDIN/STDOUT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]