diff --git a/CHANGELOG.md b/CHANGELOG.md index 4141fb2..45a4aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Fixed +- Correctly resolve URLs in `publish` command by @daimond113 + ## [0.5.0-rc.17] - 2024-12-11 ### Added - Allow multiple, user selectable scripts packages to be selected (& custom packages inputted) in `init` command by @daimond113 diff --git a/src/cli/commands/publish.rs b/src/cli/commands/publish.rs index 550b1a8..20a5b1c 100644 --- a/src/cli/commands/publish.rs +++ b/src/cli/commands/publish.rs @@ -585,22 +585,14 @@ info: otherwise, the file was deemed unnecessary, if you don't understand why, p DependencySpecifiers::Pesde(spec) => { !config.other_registries_allowed.is_allowed_or_same( source.repo_url().clone(), - manifest - .indices - .get(spec.index.as_deref().unwrap_or(DEFAULT_INDEX_NAME)) - .unwrap() - .clone(), + gix::Url::try_from(spec.index.as_deref().unwrap()).unwrap(), ) } DependencySpecifiers::Git(spec) => !config.git_allowed.is_allowed(spec.repo.clone()), #[cfg(feature = "wally-compat")] - DependencySpecifiers::Wally(spec) => !config.wally_allowed.is_allowed( - manifest - .wally_indices - .get(spec.index.as_deref().unwrap_or(DEFAULT_INDEX_NAME)) - .unwrap() - .clone(), - ), + DependencySpecifiers::Wally(spec) => !config + .wally_allowed + .is_allowed(gix::Url::try_from(spec.index.as_deref().unwrap()).unwrap()), _ => false, }) { anyhow::bail!("dependency `{disallowed}` is not allowed on this index");