Skip to content

Example CreateGitHubSecret.ps1 uses non-existent -Secret parameter #74

Description

Problem

The example file examples/CreateGitHubSecret.ps1 calls ConvertTo-SodiumSealedBox with a -Secret parameter:

$sealedPublicKeyBox = ConvertTo-SodiumSealedBox -Secret 'mysecret' -PublicKey $response.key

But the actual parameter name on ConvertTo-SodiumSealedBox is -Message. Running the example as written fails with:

ConvertTo-SodiumSealedBox: A parameter cannot be found that matches parameter name 'Secret'.

Suggested fix

Update the example to use -Message instead of -Secret:

$sealedPublicKeyBox = ConvertTo-SodiumSealedBox -Message 'mysecret' -PublicKey $response.key

Related code

  • examples/CreateGitHubSecret.ps1
  • src/functions/public/ConvertTo-SodiumSealedBox.ps1

Notes

This was noticed during test-coverage review. There is currently no test that validates the examples against the current parameter names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions