diff --git a/internal/command/machine/run.go b/internal/command/machine/run.go index acaf4c31df..2414170031 100644 --- a/internal/command/machine/run.go +++ b/internal/command/machine/run.go @@ -126,8 +126,8 @@ var sharedFlags = flag.Set{ }, flag.String{ Name: "restart", - Description: `Set the restart policy for a Machine. Options include 'no', 'always', and 'on-fail'. - Default is 'on-fail' for Machines created by 'fly deploy' and Machines with a schedule. Default is 'always' for Machines created by 'fly m run'.`, + Description: `Set the restart policy for a Machine. Options include 'no', 'always', and 'on-failure'. + Default is 'on-failure' for Machines created by 'fly deploy' and Machines with a schedule. Default is 'always' for Machines created by 'fly m run'.`, }, flag.StringSlice{ Name: "standby-for", @@ -780,7 +780,7 @@ func determineMachineConfig( machineConf.Restart = &fly.MachineRestart{ Policy: fly.MachineRestartPolicyNo, } - case "on-fail": + case "on-failure": machineConf.Restart = &fly.MachineRestart{ Policy: fly.MachineRestartPolicyOnFailure, } diff --git a/internal/command/mcp/server/machine.go b/internal/command/mcp/server/machine.go index f1c1b9736e..e77f66aa0a 100644 --- a/internal/command/mcp/server/machine.go +++ b/internal/command/mcp/server/machine.go @@ -309,7 +309,7 @@ var MachineCommands = []FlyCommand{ Description: "Restart policy for the new machine", Required: false, Type: "enum", - Enum: []string{"no", "always", "on-fail"}, + Enum: []string{"no", "always", "on-failure"}, }, "rm": { Description: "Automatically remove the Machine when it exits", @@ -986,7 +986,7 @@ var MachineCommands = []FlyCommand{ Description: "Restart policy for the new machine", Required: false, Type: "enum", - Enum: []string{"no", "always", "on-fail"}, + Enum: []string{"no", "always", "on-failure"}, }, "rm": { Description: "Automatically remove the Machine when it exits", @@ -1482,7 +1482,7 @@ var MachineCommands = []FlyCommand{ Description: "Restart policy for the new machine", Required: false, Type: "enum", - Enum: []string{"no", "always", "on-fail"}, + Enum: []string{"no", "always", "on-failure"}, }, "schedule": { Description: "Schedule for the new machine",