fix: allow publishing packages with scripts with no lib or bin

This commit is contained in:
daimond113 2024-12-08 13:55:18 +01:00
parent 7311427518
commit eab46e4ee5
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
2 changed files with 10 additions and 1 deletions

View file

@ -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

View file

@ -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");
}