diff --git a/README.md b/README.md index c50f34f..279ee05 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ Environment variables | Env Key | Env Value | |---------------|----------------------------------------------------------------| | `HOME` | User home, default by OS system | -| `SKIP_CACHE` | Skip compiled cached file , turn on `true`, `yes`, `on` or `1` | -| `RUST_SCRIPT` | `rust_script` command line bin file | -| `MAX_SCRIPT_LEN` | Max script length | +| `RUNRS_SKIP_CACHE` | Skip compiled cached file , turn on `true`, `yes`, `on` or `1` | +| `RUNRS_RUST_SCRIPT` | `rust_script` command line bin file | +| `RUNRS_MAX_SCRIPT_LEN` | Max script length |
diff --git a/src/main.rs b/src/main.rs index d632b64..f474880 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,7 @@ fn main() { } fn build_script_command(rust_script: PathBuf, script_file: &str, script_sha256: &str, cache_script_bin_name: &str) -> Command { - let skip_cache = is_env_on("SKIP_CACHE"); + let skip_cache = is_env_on("RUNRS_SKIP_CACHE"); let cache_script_bin_name_exists = fs::metadata(&cache_script_bin_name).is_ok(); debugging!("Bin name: {} {}exists", cache_script_bin_name, iff!(cache_script_bin_name_exists, "", "not ")); if !skip_cache && cache_script_bin_name_exists { @@ -98,7 +98,7 @@ runrs [arguments] fn read_file_and_digest(script_file: &str) -> (String, String) { let default_max_script_len = 1024 * 1024; - let max_script_len: u64 = env::var("MAX_SCRIPT_LEN") + let max_script_len: u64 = env::var("RUNRS_MAX_SCRIPT_LEN") .map(|len| len.parse().unwrap_or_else(|| default_max_script_len)).unwrap_or_else(|| default_max_script_len); match fs::metadata(script_file) { Err(_) => failure_and_exit!("Script file not exists: {}", script_file), @@ -117,7 +117,7 @@ fn read_file_and_digest(script_file: &str) -> (String, String) { } fn get_run_script_bin_name(home: &str) -> PathBuf { - if let Ok(rust_script) = env::var("RUST_SCRIPT") { + if let Ok(rust_script) = env::var("RUNRS_RUST_SCRIPT") { let rust_script_path_buf = PathBuf::from(&rust_script); if !rust_script_path_buf.exists() { warning!("RUST_SCRIPT={} not exists", &rust_script);