From 63b5155110038e62b7397d74b5b8e68ca21473a1 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Tue, 24 Sep 2024 20:16:41 +0900 Subject: [PATCH] Fix argument format for calculatepackageid command (#4993) This patch updates the argument format for `calculatepackageid` command, enclosing `packageFile` in square brankets to indicate that the specific file name should be put. Signed-off-by: Tatsuya Sato --- docs/source/commands/peercommand.md | 2 +- docs/source/commands/peerlifecycle.md | 2 +- internal/peer/lifecycle/chaincode/calculatepackageid.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/commands/peercommand.md b/docs/source/commands/peercommand.md index b9bec750b32..e66c51c46f7 100644 --- a/docs/source/commands/peercommand.md +++ b/docs/source/commands/peercommand.md @@ -5,7 +5,7 @@ The `peer` command has five different subcommands, each of which allows administrators to perform a specific set of tasks related to a peer. For example, you can use the `peer channel` subcommand to join a peer to a channel, - or the `peer chaincode` command to deploy a smart contract chaincode to a + or the `peer chaincode` command to deploy a smart contract chaincode to a peer. ## Syntax diff --git a/docs/source/commands/peerlifecycle.md b/docs/source/commands/peerlifecycle.md index 8eaae224cdf..759c1317c7e 100644 --- a/docs/source/commands/peerlifecycle.md +++ b/docs/source/commands/peerlifecycle.md @@ -200,7 +200,7 @@ Global Flags: Calculate the package ID for a packaged chaincode. Usage: - peer lifecycle chaincode calculatepackageid packageFile [flags] + peer lifecycle chaincode calculatepackageid [packageFile] [flags] Flags: --connectionProfile string The fully qualified path to the connection profile that provides the necessary connection information for the network. Note: currently only supported for providing peer connection information diff --git a/internal/peer/lifecycle/chaincode/calculatepackageid.go b/internal/peer/lifecycle/chaincode/calculatepackageid.go index 0bb2af0e93d..af7cd91d638 100644 --- a/internal/peer/lifecycle/chaincode/calculatepackageid.go +++ b/internal/peer/lifecycle/chaincode/calculatepackageid.go @@ -52,7 +52,7 @@ func (i *CalculatePackageIDInput) Validate() error { // the package ID for a packaged chaincode func CalculatePackageIDCmd(p *PackageIDCalculator) *cobra.Command { calculatePackageIDCmd := &cobra.Command{ - Use: "calculatepackageid packageFile", + Use: "calculatepackageid [packageFile]", Short: "Calculate the package ID for a chaincode.", Long: "Calculate the package ID for a packaged chaincode.", ValidArgs: []string{"1"},