Skip to content

Commit

Permalink
fix: resolve abbreviated path references (#45)
Browse files Browse the repository at this point in the history
Closes #43
  • Loading branch information
zmitchell authored Aug 8, 2023
1 parent 96145bd commit 20ccaf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/runix/src/flake_ref/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ impl FlakeRef {
T: AsRef<str>,
P: AsRef<Path>,
{
let parsed = url_parser::resolve_flake_ref(uri, bin_path)?;
let parsed_ref = parsed.original_ref;
let parsed = url_parser::installable_flake_ref(uri, bin_path)?;
let parsed_ref = parsed.r#ref;
match parsed_ref.flake_type {
FlakeType::Path => {
let path_ref = PathRef::try_from(parsed_ref.attrs)?;
Expand Down Expand Up @@ -575,7 +575,7 @@ pub(super) mod tests {
));
assert!(matches!(
FlakeRef::from_url("./", PARSER_UTIL_BIN_PATH).unwrap(),
FlakeRef::Path(_)
FlakeRef::GitPath(_)
));
assert!(matches!(
FlakeRef::from_url("git+ssh://github.com/flox/runix", PARSER_UTIL_BIN_PATH).unwrap(),
Expand Down
1 change: 1 addition & 0 deletions crates/runix/src/url_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ where

/// The possible flake output types
#[derive(Debug, Deserialize, Clone)]
#[serde(rename_all = "lowercase")]
pub enum InstallableOutputs {
All,
Default,
Expand Down

0 comments on commit 20ccaf4

Please sign in to comment.