summaryrefslogtreecommitdiff
path: root/src/deno_dir.rs
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2018-09-13 23:04:02 -0700
committerBert Belder <bertbelder@gmail.com>2018-09-16 18:39:07 -0700
commitc7a4ca3c88850b6409888038aee7792087f081d8 (patch)
tree16d8592ce688f710eb78719b3af82144f3921b17 /src/deno_dir.rs
parent0185f9f9de3d0a65f1ce463e479d5069eabe3c96 (diff)
Use `dirs::home_dir` to replace deprecated `std::env::home_dir`
Diffstat (limited to 'src/deno_dir.rs')
-rw-r--r--src/deno_dir.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/deno_dir.rs b/src/deno_dir.rs
index 53fbf5ba8..cdebf05c3 100644
--- a/src/deno_dir.rs
+++ b/src/deno_dir.rs
@@ -1,4 +1,5 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
+use dirs;
use errors::DenoError;
use errors::DenoResult;
use errors::ErrorKind;
@@ -39,7 +40,7 @@ impl DenoDir {
custom_root: Option<&Path>,
) -> std::io::Result<DenoDir> {
// Only setup once.
- let home_dir = std::env::home_dir().expect("Could not get home directory.");
+ let home_dir = dirs::home_dir().expect("Could not get home directory.");
let default = home_dir.join(".deno");
let root: PathBuf = match custom_root {