mirror of https://github.com/jdx/mise
feat: ubi forge option support (#4642)
https://docs.rs/ubi/0.5.2/ubi/struct.UbiBuilder.html#method.forge Without this, gitlab.com projects can be installed by specifying the full URL, but that's a bit unwieldy and doesn't work for other GitLab instances besides the gitlab.com one.
This commit is contained in:
parent
bfe8323964
commit
5b13e4e1a5
|
@ -14,8 +14,9 @@ use regex::Regex;
|
|||
use std::env;
|
||||
use std::fmt::Debug;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
use std::sync::OnceLock;
|
||||
use ubi::UbiBuilder;
|
||||
use ubi::{ForgeType, UbiBuilder};
|
||||
use xx::regex;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -115,6 +116,9 @@ impl Backend for UbiBackend {
|
|||
if let Some(matching) = opts.get("matching") {
|
||||
builder = builder.matching(matching);
|
||||
}
|
||||
if let Some(forge) = opts.get("forge") {
|
||||
builder = builder.forge(ForgeType::from_str(forge)?);
|
||||
}
|
||||
|
||||
let mut ubi = builder.build().map_err(|e| eyre::eyre!(e))?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue