From 8fdfeac5cc066d61193f525265523dfdfceabf8c Mon Sep 17 00:00:00 2001 From: Fabrice Normandin Date: Tue, 19 Sep 2023 13:20:15 -0400 Subject: [PATCH] Re-add check for "/" prefix (not sure why or how it got removed in the first place tbh) Signed-off-by: Fabrice Normandin --- milatools/cli/commands.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/milatools/cli/commands.py b/milatools/cli/commands.py index d2b0cac4..03cda60d 100644 --- a/milatools/cli/commands.py +++ b/milatools/cli/commands.py @@ -304,6 +304,11 @@ def code(): node_name = data["node_name"] + if not path.startswith("/"): + # Get $HOME because we have to give the full path to code + home = remote.home() + path = "/".join([home, path]) + try: while True: here.run( @@ -408,8 +413,7 @@ def list(): necessary_keys = {"node_name", "to_forward"} if any(k not in info for k in necessary_keys): qn.print( - f"{identifier} ({program}, MISSING INFO)", - style="bold red", + f"{identifier} ({program}, MISSING INFO)", style="bold red" ) to_purge.append((identifier, jobid)) else: