Skip to content

Commit

Permalink
fix: create test directories (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored Mar 3, 2025
1 parent ea22fe9 commit de11d0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/rattler_menuinst/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,21 @@ impl Directories {

/// Create a fake Directories struct for testing ONLY
pub fn fake_folders(path: &Path) -> Directories {
// Prepare the directories
fs::create_dir_all(&path).unwrap();

let terminal_settings_json = path.join("terminal_settings.json");
if !terminal_settings_json.exists() {
// This is for testing only, so we can ignore the result
std::fs::write(&terminal_settings_json, "{}").unwrap();
fs::write(&terminal_settings_json, "{}").unwrap();
}

let start_menu = path.join("Start Menu");
fs::create_dir_all(&start_menu).unwrap();

let quick_launch = Some(path.join("Quick Launch"));
fs::create_dir_all(quick_launch.as_ref().unwrap()).unwrap();

let desktop = path.join("Desktop");
fs::create_dir_all(&desktop).unwrap();

Expand Down

0 comments on commit de11d0d

Please sign in to comment.