Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Sep 21, 2024
1 parent 1f5824d commit 256a49a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions shelltests/macos/install_erlang.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
target/debug/beamup install erlang OTP-27.1
>>>=0

find /Users/runner/Library -name erl
>>>=0

DEBUG=1 ~/.beamup/bin/erlc
>>>=0
8 changes: 4 additions & 4 deletions src/languages/erlang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::config;
use crate::github::GithubRepo;
use crate::languages;
use crate::languages::{Language, LanguageStruct};
use color_eyre::{eyre::eyre, eyre::Report, eyre::Result};
use color_eyre::eyre::Result;

const LANGUAGE_STRING: &str = "erlang";

Expand Down Expand Up @@ -58,9 +58,9 @@ fn asset_prefix(release: &str, _config: &config::Config) -> Result<String> {
("x86_64", "windows") => Ok(format!("otp_win64_{vsn}.exe")),
("x86_64", "macos") => Ok(format!("{release}-macos-amd64.tar.gz")),
("aarch64", "macos") => Ok(format!("{release}-macos-arm64.tar.gz")),
(arch, os) => {
let e: Report = eyre!("no Erlang asset found to support arch:{arch} os:{os}");
Err(e)
_ => {
// TODO: maybe turn this into an Option type and return None
Ok("".to_string())
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub fn run_component(bin: &str, kind: &components::Kind, args: Args) -> Result<(
let cmd = Path::new(&dir).join("bin").join(bin);

debug!("running component {:?}", cmd);
debug!("running with args {:?}", args);

let mut binding = Command::new(cmd);
let cmd = binding.args(args);
Expand All @@ -24,6 +25,7 @@ pub fn run(bin: &str, args: Args) -> Result<()> {
let cmd = Path::new(&dir).join("bin").join(bin);

debug!("running language {:?}", cmd);
debug!("running with args {:?}", args);

let mut binding = Command::new(cmd);
let cmd = binding.args(args);
Expand Down

0 comments on commit 256a49a

Please sign in to comment.