Skip to content

Commit 7d42e8a

Browse files
committed
Update --reason flag usage example with detailed migration message
1 parent db22918 commit 7d42e8a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

command/v7/update_stack_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type UpdateStackCommand struct {
1616
RequiredArgs flag.StackName `positional-args:"yes"`
1717
State string `long:"state" description:"State to transition the stack to (active, restricted, deprecated, disabled)" required:"true"`
1818
Reason string `long:"reason" description:"Optional plain text describing the stack state change"`
19-
usage interface{} `usage:"CF_NAME update-stack STACK_NAME [--state (active | restricted | deprecated | disabled)] [--reason REASON]\n\nEXAMPLES:\n CF_NAME update-stack cflinuxfs3 --state disabled\n CF_NAME update-stack cflinuxfs3 --state deprecated --reason 'Use cflinuxfs4 instead'"`
19+
usage interface{} `usage:"CF_NAME update-stack STACK_NAME [--state (active | restricted | deprecated | disabled)] [--reason text]\n\nEXAMPLES:\n CF_NAME update-stack cflinuxfs3 --state disabled\n CF_NAME update-stack cflinuxfs3 --state deprecated --reason \"This stack is based on Ubuntu 18.04, which is no longer supported. Please migrate your applications to 'cflinuxfs4'. For more information, see: <link-to-docs>.\""`
2020
relatedCommands interface{} `related_commands:"stack, stacks"`
2121
}
2222

integration/v7/isolated/update_stack_command_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ var _ = Describe("update-stack command", func() {
4444
Eventually(session).Should(Say(`NAME:`))
4545
Eventually(session).Should(Say(`update-stack - Transition a stack between the defined states`))
4646
Eventually(session).Should(Say(`USAGE:`))
47-
Eventually(session).Should(Say(`cf update-stack STACK_NAME \[--state \(active \| restricted \| deprecated \| disabled\)\] \[--reason REASON\]`))
47+
Eventually(session).Should(Say(`cf update-stack STACK_NAME \[--state \(active \| restricted \| deprecated \| disabled\)\] \[--reason text\]`))
4848
Eventually(session).Should(Say(`EXAMPLES:`))
4949
Eventually(session).Should(Say(`cf update-stack cflinuxfs3 --state disabled`))
50-
Eventually(session).Should(Say(`cf update-stack cflinuxfs3 --state deprecated --reason 'Use cflinuxfs4 instead'`))
50+
Eventually(session).Should(Say(`cf update-stack cflinuxfs3 --state deprecated --reason "This stack is based on Ubuntu 18.04, which is no longer supported. Please migrate your applications to 'cflinuxfs4'. For more information, see: <link-to-docs>."`))
5151
Eventually(session).Should(Say(`OPTIONS:`))
5252
Eventually(session).Should(Say(`--state\s+State to transition the stack to`))
5353
Eventually(session).Should(Say(`SEE ALSO:`))

0 commit comments

Comments
 (0)