Skip to content

Reject repeated --target= prefixes instead of silently stripping them #164

Closed

Description

@LunaStev

Audited against merged master 13289d7a74ad45561554bbb6673a189dbb192a27 (PR #161).

Problem and reproduction

The build-option parser uses trim_start_matches("--target="), which removes every repeated prefix rather than just the option prefix.

With a valid project, local lockfile and compiler fixture:

vex build --target=--target=x86_64-unknown-linux-gnu --dry-run

Observed: exit 0 and a plan for x86_64-unknown-linux-gnu. The malformed value is silently accepted.

Scope and acceptance

  • Remove exactly one option prefix and let normal target-value validation reject the remaining option-like value.
  • The example returns CLI usage exit code 2 before compiler invocation or project writes.
  • Add coverage for repeated prefixes, a normal --target=TRIPLE, and the existing separate-value form.
  • Cover the shared parsing contract used by build/check/run.

This is a narrow uncovered case following #35, not a request for additional raw compiler options.

Starting points

This is a bounded follow-up suitable for a first contribution; no broader feature redesign is requested.

Activity

  1. added
    bug
    good first issue
    ui/ux
    on Oct 18, 2026
  2. self-assigned this
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issueui/ux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions