Skip to content

Commit b64f9f0

Browse files
committed
Remove ROBLOX_CONTENT_PATH env variable
It's not actually necessary because `roblox_install` handles a `ROBLOX_STUDIO_PATH` variable itself
1 parent c91f11f commit b64f9f0

1 file changed

Lines changed: 4 additions & 26 deletions

File tree

src/sync/backend/studio.rs

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use crate::{
44
lockfile::LockfileEntry,
55
sync::backend::Params,
66
};
7-
use anyhow::{Context, bail};
7+
use anyhow::Context;
88
use fs_err::tokio as fs;
9-
use log::{debug, info, warn};
9+
use log::{info, warn};
1010
use relative_path::RelativePathBuf;
1111
use roblox_install::RobloxStudio;
1212
use std::{env, path::PathBuf};
@@ -21,7 +21,8 @@ impl Backend for Studio {
2121
where
2222
Self: Sized,
2323
{
24-
let content_path = get_content_path()?;
24+
let studio = RobloxStudio::locate()?;
25+
let content_path = studio.content_path();
2526

2627
let cwd = env::current_dir()?;
2728
let cwd_name = cwd
@@ -85,26 +86,3 @@ impl Backend for Studio {
8586
))))
8687
}
8788
}
88-
89-
fn get_content_path() -> anyhow::Result<PathBuf> {
90-
if let Ok(var) = env::var("ROBLOX_CONTENT_PATH") {
91-
let path = PathBuf::from(var);
92-
93-
if path.exists() {
94-
debug!(
95-
"Using environment variable content path: {}",
96-
path.display()
97-
);
98-
return Ok(path);
99-
} else {
100-
bail!("Content path `{}` does not exist", path.display());
101-
}
102-
}
103-
104-
let studio = RobloxStudio::locate()?;
105-
let path = studio.content_path();
106-
107-
debug!("Using auto-detected content path: {}", path.display());
108-
109-
Ok(path.to_owned())
110-
}

0 commit comments

Comments
 (0)