Skip to content

Handle global flags before subcommand in hurry cross #266

Description

@jssblck

Problem

Currently, hurry cross assumes that if the first argument starts with -, we're running against cross directly and should passthrough. However, this misses cases like:

cross --locked build --target x86_64-unknown-linux-gnu

In this case, --locked is the first argument but build should still be accelerated.

Context

This is the same issue that exists for hurry cargo - see the similar FIXME in cmd/cargo.rs.

Reference: PR #254 review comment from @elldritch

Suggested approach

Parse global flags first, then dispatch to the appropriate subcommand handler. This would allow acceleration to work correctly for commands like cross --locked build.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions