diff --git a/docs/metal_device_update.md b/docs/metal_device_update.md index 6e65582c..506dd5a9 100644 --- a/docs/metal_device_update.md +++ b/docs/metal_device_update.md @@ -7,7 +7,7 @@ Updates a device. Updates the hostname of a device. Updates or adds a description, tags, userdata, custom data, and iPXE settings for an already provisioned device. Can also lock or unlock future changes to the device. ``` -metal device update -i [-H ] [-d ] [--locked ] [-t ] [-u ] [-c ] [-s ] [--always-pxe] [flags] +metal device update -i [-H ] [-d ] [--locked ] [-t ] [-u ] [-c ] [-s ] [--always-pxe=] [flags] ``` ### Examples diff --git a/internal/devices/update.go b/internal/devices/update.go index 71b342ea..5f33dba6 100644 --- a/internal/devices/update.go +++ b/internal/devices/update.go @@ -44,7 +44,7 @@ func (c *Client) Update() *cobra.Command { ) // updateDeviceCmd represents the updateDevice command updateDeviceCmd := &cobra.Command{ - Use: `update -i [-H ] [-d ] [--locked ] [-t ] [-u ] [-c ] [-s ] [--always-pxe]`, + Use: `update -i [-H ] [-d ] [--locked ] [-t ] [-u ] [-c ] [-s ] [--always-pxe=]`, Short: "Updates a device.", Long: "Updates the hostname of a device. Updates or adds a description, tags, userdata, custom data, and iPXE settings for an already provisioned device. Can also lock or unlock future changes to the device.", Example: ` # Updates the hostname of a device: @@ -74,7 +74,7 @@ func (c *Client) Update() *cobra.Command { deviceUpdate.Tags = tags } - if alwaysPXE { + if cmd.Flag("always-pxe").Changed { deviceUpdate.SetAlwaysPxe(alwaysPXE) }