From eab46e4ee5ad53aad6eb2db30df65b12da62c7fb Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Sun, 8 Dec 2024 13:55:18 +0100 Subject: [PATCH] fix: allow publishing packages with scripts with no lib or bin --- CHANGELOG.md | 6 ++++++ src/cli/commands/publish.rs | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 479bcdb..0011b50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ 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 +- Do not require lib or bin exports if package exports scripts by @daimond113 + ## [0.5.0-rc.15] - 2024-12-08 +Release not available on GitHub and yanked from crates.io due to issues while publishing. + ### Added - Add improved CLI styling by @daimond113 - Install pesde dependencies before Wally to support scripts packages by @daimond113 diff --git a/src/cli/commands/publish.rs b/src/cli/commands/publish.rs index 298c02f..855643b 100644 --- a/src/cli/commands/publish.rs +++ b/src/cli/commands/publish.rs @@ -68,7 +68,10 @@ impl PublishCommand { return Ok(()); } - if manifest.target.lib_path().is_none() && manifest.target.bin_path().is_none() { + if manifest.target.lib_path().is_none() + && manifest.target.bin_path().is_none() + && manifest.target.scripts().is_none_or(|s| s.is_empty()) + { anyhow::bail!("no exports found in target"); }