diff --git a/Cargo.lock b/Cargo.lock index f2da713..ec5d268 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ checksum = "b03f7fbd470aa8b3ad163c85cce8bccfc11cc9c44ef12da0a4eddd98bd307352" [[package]] name = "spl" -version = "0.1.2" +version = "0.1.4" dependencies = [ "multicall", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 42f5779..24ededc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spl" -version = "0.1.3" +version = "0.1.4" edition = "2021" description = "Stack Pogramming Language: A simple, concise scripting language." license = "MIT" diff --git a/src/oxidizer/mod.rs b/src/oxidizer/mod.rs index f02ab73..abc2d14 100644 --- a/src/oxidizer/mod.rs +++ b/src/oxidizer/mod.rs @@ -173,7 +173,28 @@ impl RustAppBuilder { .unwrap() .wait_with_output()?; Ok(RustApp { - binary: format!("{tmp}/spl-{name}/target/release/spl-{name}"), + binary: { + // insanity. will have to clean this up at some point. + let dir = format!("{tmp}/spl-{name}/target/release/"); + fs::read_dir(dir) + .expect("unable to build: dir was not created.") + .filter(|x| { + let x = x + .as_ref() + .expect("file system did something i cannot comprehend"); + let n = x.file_name().into_string().unwrap(); + x.file_type().expect("file system uhhh?????").is_file() + && !n.ends_with(".d") + && !n.starts_with(".") + }) + .next() + .expect("cargo was unable to build the binary") + .expect("file system did something i cannot comprehend") + .path() + .into_os_string() + .into_string() + .expect("bad unicode in file path") + }, }) } }