Skip to content

Commit dddba28

Browse files
committed
fix(update): serialize InstallMethod enum to string in all UpdateResult calls
The previous fix only covered config._set_config_value(). Every UpdateResult(installation_method=install_info.method) also passed the raw enum, which fails YAML serialization downstream. Apply .value to all five remaining occurrences.
1 parent a7f5105 commit dddba28

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/deepctl-cmd-update/src/deepctl_cmd_update

packages/deepctl-cmd-update/src/deepctl_cmd_update/command.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def handle(
157157
current_version=version_info.current_version,
158158
latest_version=version_info.latest_version,
159159
update_available=version_info.update_available,
160-
installation_method=install_info.method,
160+
installation_method=install_info.method.value,
161161
).model_dump()
162162

163163
# Show update command
@@ -173,7 +173,7 @@ def handle(
173173
current_version=version_info.current_version,
174174
latest_version=version_info.latest_version,
175175
update_available=version_info.update_available,
176-
installation_method=install_info.method,
176+
installation_method=install_info.method.value,
177177
).model_dump()
178178

179179
# Execute update
@@ -201,7 +201,7 @@ def handle(
201201
current_version=version_info.current_version,
202202
latest_version=version_info.latest_version,
203203
update_available=False,
204-
installation_method=install_info.method,
204+
installation_method=install_info.method.value,
205205
).model_dump()
206206
else:
207207
error_msg = result.stderr if result.stderr else "Unknown error"
@@ -217,7 +217,7 @@ def handle(
217217
current_version=version_info.current_version,
218218
latest_version=version_info.latest_version,
219219
update_available=version_info.update_available,
220-
installation_method=install_info.method,
220+
installation_method=install_info.method.value,
221221
).model_dump()
222222

223223
except Exception as e:
@@ -233,5 +233,5 @@ def handle(
233233
current_version=version_info.current_version,
234234
latest_version=version_info.latest_version,
235235
update_available=version_info.update_available,
236-
installation_method=install_info.method,
236+
installation_method=install_info.method.value,
237237
).model_dump()

0 commit comments

Comments
 (0)