Skip to content

Fix CI package test step on newer cargo - #15

Merged
Manishearth merged 1 commit into
unicode-rs:masterfrom
yhirose:fix-ci-package-dir
Oct 11, 2026
Merged

Manishearth merged 1 commit into
unicode-rs:masterfrom
yhirose:fix-ci-package-dir

Conversation

@yhirose

@yhirose yhirose commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Problem

The Test package step fails on current stable (seen in #14):

cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test
cd: too many arguments

The find assumes target/package/ contains exactly one directory. Newer cargo also leaves target/package/tmp-crate/ behind after cargo package, so two directories are returned and cd fails. This is unrelated to the changes in #14. CI simply had not run since November 2025, so the breakage went unnoticed.

Reproduced locally:

cargo directories in target/package/
1.91.1 unicode-properties-0.1.4
1.95.0 unicode-properties-0.1.4, tmp-crate

Fix

Select the unpacked crate by package name in both Test package and Test package without features:

run: cd target/package/unicode-properties-*/ && cargo test

The trailing slash makes the glob match directories only, so neither tmp-crate nor the .crate file is picked up.

Testing

Ran both commands locally with cargo 1.95.0 while tmp-crate/ was present. Both pass.

Newer cargo leaves target/package/tmp-crate/ behind after
`cargo package`, so the `find` used to locate the unpacked
crate returned two directories and `cd` failed with
"too many arguments".

Select the directory by package name instead. The trailing
slash makes the glob match directories only, so neither
tmp-crate nor the .crate file is picked up.
@yhirose yhirose mentioned this pull request Oct 10, 2026
@Manishearth
Manishearth merged commit b6d5c6a into unicode-rs:master Oct 11, 2026
@yhirose
yhirose deleted the fix-ci-package-dir branch October 11, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants