Skip to content

Commit 1188604

Browse files
ZexbeJoshua Nelson
authored and
Joshua Nelson
committed
Add error message for missing CRATESFYI_PREFIX
1 parent 9164b48 commit 1188604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl CratesfyiHandler {
112112

113113
let shared_resources = Self::chain(&pool_factory, rustdoc::SharedResourceHandler);
114114
let router_chain = Self::chain(&pool_factory, routes.iron_router());
115-
let prefix = PathBuf::from(env::var("CRATESFYI_PREFIX").unwrap()).join("public_html");
115+
let prefix = PathBuf::from(env::var("CRATESFYI_PREFIX").expect("the CRATESFYI_PREFIX environment variable is not set")).join("public_html");
116116
let static_handler = Static::new(prefix)
117117
.cache(Duration::from_secs(STATIC_FILE_CACHE_DURATION));
118118

0 commit comments

Comments
 (0)