aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installed_versions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/installed_versions.rs')
-rw-r--r--crates/shirabe/src/installed_versions.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/shirabe/src/installed_versions.rs b/crates/shirabe/src/installed_versions.rs
index 77d653f..fb6e8bf 100644
--- a/crates/shirabe/src/installed_versions.rs
+++ b/crates/shirabe/src/installed_versions.rs
@@ -423,6 +423,16 @@ impl InstalledVersions {
*INSTALLED_IS_LOCAL_DIR.lock().unwrap() = false;
}
+ /// PHP mutates the private static `$selfDir` via Reflection. Rust exposes a mutating function.
+ pub fn set_self_dir(dir: String) {
+ *SELF_DIR.lock().unwrap() = Some(dir);
+ }
+
+ /// PHP mutates the private static `$installedIsLocalDir` via Reflection. Rust exposes a mutating function.
+ pub fn set_installed_is_local_dir(value: bool) {
+ *INSTALLED_IS_LOCAL_DIR.lock().unwrap() = value;
+ }
+
/// @return string
fn get_self_dir() -> String {
let mut self_dir = SELF_DIR.lock().unwrap();