Skip to content

"trusted-signing <file(s)>" doesn't accept multiple files #815

@bgrainger

Description

@bgrainger

Describe the bug

Run sign code trusted-signing --help. It prints:

Usage:
  sign code trusted-signing <file(s)> [options]

The expectation is that one can pass multiple absolute paths (to different DLLs or EXEs) to the command. However, if you do so, you get the error:

Unrecognized command or argument 'C:\Path\To\Dll2.dll'.

Repro steps

Run:

sign code trusted-signing C:\Path\To\Dll1.dll C:\Path\To\Dll2.dll -tse https://wus2.codesigning.azure.net/ -tsa REDACTED -tscp REDACTED -fd sha256 -t http://timestamp.acs.microsoft.com -td sha256 -v Debug

You get the error:

Unrecognized command or argument 'C:\Path\To\Dll2.dll'.

Expected behavior

Multiple files can be specified and all will be signed.

Actual behavior

The second file generates an error.

Additional context

  • Include the output of sign --version: 0.9.1-beta.24529.1+029731ca2df9d41933a09a1cc9212595a7c7932a
  • Include the output of dotnet --info.
.NET SDK:
 Version:           9.0.102
 Commit:            cb83cd4923
 Workload version:  9.0.100-manifests.c4f6226a
 MSBuild version:   17.12.18+ed8c6aec5
  • Add any other context about the problem here.

Appears to be related to this:

internal Argument<string?> FileArgument { get; } = new("file(s)", Resources.FilesArgumentDescription);

The simplest fix would be to change the documentation to <file>, not <file(s)>. However, the desired behavior would be for multiple files to be supported.

I was going to try using a file list as a workaround but I saw #768 which indicates that that might not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasecommunity-contributionIndicates that the PR has been added by a community membertool-parityWork necessary to bring Sign CLI up to feature parity with an existing tool

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions