fix: west was missing from the start of the west command, duh

This commit is contained in:
unai committed 2026-10-19 19:52:26 +02:00
1 parent 10bbc83992
commit 5fed6bfd28
1 file changed
+4 -3
+4 -3
View File
@@ -57,8 +57,10 @@ local CONFIRM = {
.. "AP-Protect / readback protection.\n¿Seguir?", .. "AP-Protect / readback protection.\n¿Seguir?",
} }
--- OJO: el primer token DEBE ser "west". `toolchain-manager launch`
--- interpreta el primer argumento tras "--" como el comando a lanzar.
local function argv(opts, sn, mode) local function argv(opts, sn, mode)
local a = { "flash", "-d", opts.build_dir, "--dev-id", sn } local a = { "west", "flash", "-d", opts.build_dir, "--dev-id", sn }
if MODES[mode].flag then if MODES[mode].flag then
table.insert(a, MODES[mode].flag) table.insert(a, MODES[mode].flag)
end end
@@ -113,7 +115,7 @@ function M.run(opts, mode)
end end
--- Plan B: recuperar la placa sin pasar por west ni por sysbuild. --- Plan B: recuperar la placa sin pasar por west ni por sysbuild.
--- Útil si `west flash --recover` se atraganta con el multi-dominio. --- No va envuelto en el toolchain, es nrfutil a pelo.
function M.device_recover(opts) function M.device_recover(opts)
local devs = M.devices() local devs = M.devices()
if #devs == 0 then if #devs == 0 then
@@ -130,7 +132,6 @@ function M.device_recover(opts)
local exec = require("hego.exec") local exec = require("hego.exec")
local function go(sn) local function go(sn)
-- Ojo: esto NO va envuelto en el toolchain, es nrfutil a pelo.
exec.run_async({ "nrfutil", "device", "recover", "--serial-number", sn }, { exec.run_async({ "nrfutil", "device", "recover", "--serial-number", sn }, {
title = "hego://device-recover", title = "hego://device-recover",
cwd = vim.fn.getcwd(), cwd = vim.fn.getcwd(),