diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2024-12-10 19:06:52 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2024-12-10 19:06:55 +0000 |
commit | 700512c0085a605dfe604f71d8e04ee08c3db954 (patch) | |
tree | 8e78746a5918b7024416872e85b408f54244e351 /core/utils.py | |
parent | 26eff0172bf19fd7958ff92dde818a360f3855af (diff) | |
download | troggle-700512c0085a605dfe604f71d8e04ee08c3db954.tar.gz troggle-700512c0085a605dfe604f71d8e04ee08c3db954.tar.bz2 troggle-700512c0085a605dfe604f71d8e04ee08c3db954.zip |
disambiguate error messages
Diffstat (limited to 'core/utils.py')
-rw-r--r-- | core/utils.py | 5 |
1 files 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 |