Skip to content

Commit 08526f9

Browse files
committed
Make missing CRATESFYI_PREFIX easier to debug
1 parent 9c0d43f commit 08526f9

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
@@ -111,7 +111,7 @@ impl CratesfyiHandler {
111111

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

0 commit comments

Comments
 (0)