diff mbox series

[09/20] devtool: ide-sdk: extract install task definition

Message ID 20261026-devtool-ide-sdk-cargo-v1-9-d4504e124d07@savoirfairelinux.com
State New
Headers show
Series devtool: ide-sdk: add support for Rust recipes | expand

Commit Message

Enguerrand de Ribaucourt Oct. 26, 2026, 8:55 a.m. UTC
Extract the install/deploy task object before adding optional dependencies.
This preserves existing task output and provides a shared insertion point for
Cargo build/deploy ordering.

AI-Generated: Uses GitHub Copilot
Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
---
 scripts/lib/devtool/ide_plugins/ide_code.py | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py
index 53cebe71a8..b5ff344e8a 100644
--- a/scripts/lib/devtool/ide_plugins/ide_code.py
+++ b/scripts/lib/devtool/ide_plugins/ide_code.py
@@ -682,17 +682,16 @@  class IdeVSCode(IdeBase):
             deploy_args += ["--port", args.port]
         for package in args.package or []:
             deploy_args += ["--package", package]
+        install_task = {
+            "label": install_task_name,
+            "type": "shell",
+            "command": run_install_deploy,
+            "args": deploy_args,
+            "problemMatcher": []
+        }
         tasks_dict = {
             "version": "2.0.0",
-            "tasks": [
-                {
-                    "label": install_task_name,
-                    "type": "shell",
-                    "command": run_install_deploy,
-                    "args": deploy_args,
-                    "problemMatcher": []
-                }
-            ]
+            "tasks": [install_task]
         }
         for cross_debug_config in self.cross_debug_configs:
             if cross_debug_config.modified_recipe is not modified_recipe: