mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2025-12-20 11:04:41 +00:00
fix: env var
This commit is contained in:
parent
85f7b9d2fb
commit
d20d825905
@ -110,10 +110,7 @@ async fn run_command_in_tempdir(cmd: &str, args: &[&str]) -> Result<DownloadResu
|
|||||||
///
|
///
|
||||||
/// - Propagates `run_command_in_tempdir` errors.
|
/// - Propagates `run_command_in_tempdir` errors.
|
||||||
pub async fn download_instaloader(shortcode: &str) -> Result<DownloadResult> {
|
pub async fn download_instaloader(shortcode: &str) -> Result<DownloadResult> {
|
||||||
fn get_env_var(name: &str) -> Result<String> {
|
let session_file = env::var("IG_SESSION_PATH").unwrap_or_else(|_| "/app/ig-session".into());
|
||||||
env::var(name).map_err(|_| Error::env(name))
|
|
||||||
}
|
|
||||||
let session_file = get_env_var("IG_SESSION_PATH")?;
|
|
||||||
|
|
||||||
let args = [
|
let args = [
|
||||||
"--sessionfile",
|
"--sessionfile",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user