diff --git a/repak_cli/src/main.rs b/repak_cli/src/main.rs index be9d85a..d2d373b 100644 --- a/repak_cli/src/main.rs +++ b/repak_cli/src/main.rs @@ -363,7 +363,10 @@ fn unpack(aes_key: Option, action: ActionUnpack) -> Result<(), repa fs::create_dir_all(&entry.out_dir)?; pak.read_file( &entry.entry_path, - &mut BufReader::new(file.as_ref().unwrap()), // TODO: avoid this unwrap + &mut BufReader::new( + file.as_ref() + .map_err(|e| repak::Error::Other(format!("error reading pak: {e}")))?, + ), &mut fs::File::create(&entry.out_path)?, )?; progress.inc(1);