Make roc_cache_dir() panic if it can't find $HOME

This commit is contained in:
Richard Feldman 2022-11-20 20:48:09 -05:00
parent 4987fe1656
commit 7d2fa63dca
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
7 changed files with 31 additions and 61 deletions

View file

@ -409,9 +409,6 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
let target = &triple;
let opt_level = opt_level;
let target_info = TargetInfo::from(target);
let roc_cache_dir = cache::roc_cache_dir().unwrap_or_else(|| {
todo!("Gracefully handle not being able to find default Roc cache dir.")
});
// Step 1: compile the app and generate the .o file
let subs_by_module = Default::default();
@ -428,7 +425,7 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
arena,
path.to_path_buf(),
subs_by_module,
RocCacheDir::Persistent(roc_cache_dir.as_path()),
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
load_config,
)
.unwrap();