Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Makes a few improvements for CI usability of testez-cli (#104)
Browse files Browse the repository at this point in the history
* Allow testing with roblox-cli to fail the check for roblox install and
omit the content folder arguments accordingly

* Exit with an error code whenever roblox-cli does so

* Remove incorrect process exiting behavior

* Remove unneeded 'use'

* Inline roblox studio install check

Co-authored-by: Lucien Greathouse <[email protected]>

Co-authored-by: Lucien Greathouse <[email protected]>
  • Loading branch information
ZoteTheMighty and LPGhatguy authored May 20, 2020
1 parent cb76db6 commit a9d1918
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions testez-cli/src/tools/roblox_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ use roblox_install::RobloxStudio;
pub fn roblox_cli_run(place_path: &Path, entrypoint_path: &str, as_core_script: bool) {
let place_arg = place_path.to_str().unwrap();

let install = RobloxStudio::locate().expect("couldn't find Roblox Studio; is it installed?");
let content_path_arg = install.content_path().to_str().unwrap();

log::trace!("Executing 'roblox-cli run'");

let mut command = Command::new("roblox-cli");
Expand All @@ -19,10 +16,14 @@ pub fn roblox_cli_run(place_path: &Path, entrypoint_path: &str, as_core_script:
&place_arg,
"--entrypoint",
entrypoint_path,
"--assetFolder",
&content_path_arg,
]);

if let Ok(install_location) = RobloxStudio::locate() {
let content_path_arg = install_location.content_path().to_str().unwrap();
command.arg("--assetFolder");
command.arg(&content_path_arg);
}

if as_core_script {
command.arg("--load.asRobloxScript");
}
Expand Down

0 comments on commit a9d1918

Please sign in to comment.