From 700512c0085a605dfe604f71d8e04ee08c3db954 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 10 Dec 2024 19:06:52 +0000 Subject: [PATCH] disambiguate error messages --- core/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/utils.py b/core/utils.py index 07ecd51..721e7fe 100644 --- a/core/utils.py +++ b/core/utils.py @@ -298,7 +298,8 @@ def write_and_commit(files, message): else: print(f"No change {filepath}") filepaths = [filepath for filepath, content, encoding in files] - cmd_commit = [git, "commit"] + filepaths + ["-m", message] + message = message + " " + str(filepaths) + cmd_commit = [git, "commit", "-m", message] cm_status = subprocess.run(cmd_commit, cwd=cwd, capture_output=True, text=True) commands.append(cmd_commit) if cm_status.returncode != 0: @@ -315,7 +316,7 @@ def write_and_commit(files, message): f"ERROR committing. Edits saved, [maybe] added to git, but NOT committed.\n\n" + msgdata ) - cmd_status = [git, "status"] + filepaths + cmd_status = [git, "status"] # + filepaths cp_status = subprocess.run(cmd_status, cwd=cwd, capture_output=True, text=True) commands.append(cp_status) #This produces return code = 1 if it commits OK, but when the repo still needs to be pushed to origin/expoweb