Skip to content

notation blob sign --force warns about overwriting a signature file that does not exist #1380

Open

Description

@RaphaelFakhri

What is not working as expected?

notation blob sign --force always prints Warning: existing signature file will be overwritten, even when no signature file exists at the target path. The success output also starts the second line with a stray space.

What did you expect to happen?

The overwrite warning appears only when a signature file already exists, as with notation blob policy import --force and notation blob policy init --force. The success output matches specs/cmd/blob.md:

Successfully signed /tmp/my-blob.bin
Signature file written to /tmp/my-blob.bin.jws.sig

How can we reproduce it?

notation cert generate-test --default test
echo hello > /tmp/my-blob.bin
rm -f /tmp/my-blob.bin.jws.sig
notation blob sign --force /tmp/my-blob.bin

Output:

Warning: existing signature file will be overwritten
Successfully signed /tmp/my-blob.bin
 Signature file written to /tmp/my-blob.bin.jws.sig

Describe your environment

Linux, notation built from main (9ba75db).

What is the version of your Notation CLI or Notation Library?

main at 9ba75db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions