Skip to content

Commit

Permalink
--detach flag for fly m clone
Browse files Browse the repository at this point in the history
  • Loading branch information
btoews committed Jul 20, 2023
1 parent 3996140 commit d21889a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/command/machine/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func newClone() *cobra.Command {
Name: "standby-for",
Description: "Comma separated list of machine ids to watch for. You can use '--standby-for=source' to create a standby for the cloned machine",
},
flag.Detach(),
)

return cmd
Expand Down Expand Up @@ -288,6 +289,10 @@ func runMachineClone(ctx context.Context) (err error) {

fmt.Fprintf(out, " Machine %s has been created...\n", colorize.Bold(launchedMachine.ID))

if flag.GetDetach(ctx) {
return nil
}

if !input.SkipLaunch {
fmt.Fprintf(out, " Waiting for machine %s to start...\n", colorize.Bold(launchedMachine.ID))

Expand Down

0 comments on commit d21889a

Please sign in to comment.