mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
b9783cdeea
* Enable debug for OTP versions' listings * Make it easier to detect * Prevent error annotation on expected error The fact that one mirror fails in the above test and others follow working is test enough for me A single failing mirror should fail, but it's confusing to have an error annotation for a success (via continue-on-error) while not being able to suppress it via GitHub Actions * Trying to figure out why we have a rebar_core exception Might simply be that the bug is already fixed and we need to bump rebar3 * Try to debug into non-JSON input * Prevent error in rebar_core We're getting Access Denied for Fetching registry from "https://repo.hex.pm:443/registry.ets.gz?" * Try to figure out what's breaking tests * Make jsonParse(...).map failure more understandable * Ease test maintenance * Tweak folder structure while moving console._ to core._
33 lines
670 B
Rust
33 lines
670 B
Rust
use std::env;
|
|
use std::process;
|
|
use std::string;
|
|
|
|
// an example function...
|
|
fn main() {
|
|
let key = "PATH";
|
|
match env::var(key) {
|
|
Ok(val) => println!("{key}: {val:?}"),
|
|
Err(e) => println!("couldn't interpret {key}: {e}"),
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
fn rebar3_cmd_version() -> Result<String, string::FromUtf8Error> {
|
|
println!("going for rebar3.cmd");
|
|
let output = process::Command::new("rebar3.cmd")
|
|
.arg("version")
|
|
.output()
|
|
.expect("error");
|
|
return String::from_utf8(output.stdout);
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn it_works() {
|
|
rebar3_cmd_version().unwrap();
|
|
}
|
|
}
|