mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Make roc_cache_dir() panic if it can't find $HOME
This commit is contained in:
parent
4987fe1656
commit
7d2fa63dca
7 changed files with 31 additions and 61 deletions
|
@ -54,16 +54,13 @@ pub fn compile_to_mono<'a, 'i, I: Iterator<Item = &'i str>>(
|
|||
let src_dir = PathBuf::from("fake/test/path");
|
||||
let (bytes_before_expr, module_src) = promote_expr_to_module(arena, defs, expr);
|
||||
let exposed_types = Default::default();
|
||||
let roc_cache_dir = cache::roc_cache_dir().unwrap_or_else(|| {
|
||||
todo!("Gracefully handle not being able to find default Roc cache dir.")
|
||||
});
|
||||
let loaded = roc_load::load_and_monomorphize_from_str(
|
||||
arena,
|
||||
filename,
|
||||
module_src,
|
||||
src_dir,
|
||||
exposed_types,
|
||||
RocCacheDir::Persistent(roc_cache_dir.as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
LoadConfig {
|
||||
target_info,
|
||||
render: roc_reporting::report::RenderTarget::ColorTerminal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue