Skip to content

Commit a620c3a

Browse files
typing extra "#" to not re-execute old commands
we send "\n" before every command to make sure we have a clean prompt. But in doing so we mistakenly re-execute the previous command. That seems ot be the unfortunate u-boot shell behavior. Let's type "#\n" that "runs" an empty command that doesn't do anything and has the same clean prompt response we want.
1 parent ee1bcc7 commit a620c3a

File tree

1 file changed

+1
-1
lines changed
  • packages/jumpstarter-driver-uboot/jumpstarter_driver_uboot

1 file changed

+1
-1
lines changed

packages/jumpstarter-driver-uboot/jumpstarter_driver_uboot/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def run_command(self, cmd: str, timeout: int = 60, *, _internal_log=True) -> byt
7171
self.logger.info(f"Running command: {cmd}")
7272
if not hasattr(self, "p"):
7373
raise RuntimeError("Not in a reboot_to_console context")
74-
self.p.sendline("")
74+
self.p.sendline("#") # just sending "\n" re-executes the last command. "#" should be a harmless no-op
7575
self.p.expect_exact(self.prompt, timeout=timeout)
7676
self.p.sendline(cmd)
7777
self.p.expect_exact(self.prompt, timeout=timeout)

0 commit comments

Comments
 (0)