Skip to content

Commit

Permalink
install rust globally
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Sep 13, 2023
1 parent 2f64c35 commit a5b0c84
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions multiversx_sdk_cli/dependencies/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,12 @@ def _do_install(self, tag: str) -> None:
toolchain = "nightly"

args = [str(installer_path), "--verbose", "--default-toolchain", toolchain, "--profile",
"minimal", "--target", "wasm32-unknown-unknown", "--no-modify-path", "-y"]
output = myprocess.run_process(args, env=self.get_env_for_install())
"minimal", "--target", "wasm32-unknown-unknown", "-y"]
output = myprocess.run_process(args)

if output:
sc_meta_args = ["cargo", "install", "multiversx-sc-meta"]
myprocess.run_process(sc_meta_args, env=self.get_env_for_install())
myprocess.run_process(sc_meta_args)

def _get_installer_url(self) -> str:
if workstation.is_windows():
Expand Down Expand Up @@ -347,14 +347,7 @@ def _get_env_for_is_installed_in_sdk(self) -> Dict[str, str]:
}

def get_env_for_install(self):
directory = self.get_directory("")

env = {
# For installation, wget (or curl) and cc (build-essential) are also required.
"PATH": f"{path.join(directory, 'bin')}:{os.environ['PATH']}",
"RUSTUP_HOME": str(directory),
"CARGO_HOME": str(directory)
}
env: Dict[str, str] = {}

Check warning on line 350 in multiversx_sdk_cli/dependencies/modules.py

View workflow job for this annotation

GitHub Actions / runner / mypy

[mypy] reported by reviewdog 🐶 By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] Raw Output: /home/runner/work/mx-sdk-py-cli/mx-sdk-py-cli/multiversx_sdk_cli/dependencies/modules.py:350:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]

if workstation.is_windows():
env["RUSTUP_USE_HYPER"] = "1"
Expand Down

0 comments on commit a5b0c84

Please sign in to comment.