Skip to content

Commit

Permalink
fix HOME environment variable not found on Windows platform (#133)
Browse files Browse the repository at this point in the history
* [fix] fix `HOME environment variable not found` on Windows platform

starcoinorg/starcoin#3400

* fix src

* run `cargo x lint && cargo xfmt && cargo xclippy --all-targets`

Signed-off-by: satyamacn <[email protected]>
Closes: #341
  • Loading branch information
jiangying000 authored and bors-diem committed Jan 16, 2023
1 parent 877a9b7 commit bcc5572
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions language/tools/move-package/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ regex = "1.1.9"
ptree = "0.4.0"
once_cell = "1.7.2"
named-lock = "0.1.1"
dirs-next = "2.0.0"

move-binary-format = { path = "../../move-binary-format" }
move-compiler = { path = "../../move-compiler" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ fn parse_dependency(tval: TV) -> Result<PM::Dependency> {
let move_home = std::env::var("MOVE_HOME").unwrap_or_else(|_| {
format!(
"{}/.move",
std::env::var("HOME").expect("env var 'HOME' must be set")
dirs_next::home_dir()
.expect("user's home directory not found")
.to_str()
.unwrap()
)
});
let rev_name = match table.remove("rev") {
Expand Down

0 comments on commit bcc5572

Please sign in to comment.