Skip to content

cargo lambda watch overloads -p flag for both ports and package names #791

@jmracek

Description

@jmracek

Platform/Version

Version: cargo-lambda 1.6.3 (7b294c9 2025-01-27Z)
Platform: MacOS M4 max ARM

Details

I tried to watch for a specific package using the -p flag but I get an error

cargo lambda watch -p websockets
error: invalid value 'websockets' for '--invoke-port <INVOKE_PORT>': invalid digit found in string

For more information, try '--help'.

On closer examination, looks like -p has been purposed for two unrelated command line arguments:

cargo lambda watch --help       
`cargo lambda watch` boots a development server that emulates interactions with the AWS Lambda control plane. This subcommand also reloads your Rust code as you work on it

Usage: cargo lambda watch [OPTIONS] [args]...

Arguments:
  [args]...  Arguments for the binary to run

Options:
   ...
  -p, --invoke-port <INVOKE_PORT>        Address port where users send invoke requests [default: 9000]
      --print-traces                     Print OpenTelemetry traces after each function invocation

Package Selection:
  -p, --package [<SPEC>]  Package to run (see `cargo help pkgid`)

Target Selection:
      --bin [<NAME>]      Run the specified binary
      --example [<NAME>]  Run the specified example

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions