From a56241ed7b801f93af02f5a52e8e1f0a811484de Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 13 Aug 2023 00:00:11 +0200 Subject: [PATCH] jetbrains: Commit in one line Co-authored-by: Janik <80165193+Janik-Haag@users.noreply.github.com> --- pkgs/applications/editors/jetbrains/plugins/update_plugins.py | 3 +-- pkgs/applications/editors/jetbrains/update_ides.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/plugins/update_plugins.py b/pkgs/applications/editors/jetbrains/plugins/update_plugins.py index 393c09a72fc0..cf02aa7215d4 100755 --- a/pkgs/applications/editors/jetbrains/plugins/update_plugins.py +++ b/pkgs/applications/editors/jetbrains/plugins/update_plugins.py @@ -383,8 +383,7 @@ def main(): # Commit the result commitMessage = "jetbrains.plugins: update" print("#### Committing changes... ####") - run(['git', 'add', PLUGINS_FILE], check=True) - run(['git', 'commit', '--file=-'], input=commitMessage.encode(), check=True) + run(['git', 'commit', f'-m{commitMessage}', '--', f'{PLUGINS_FILE}'], check=True) if __name__ == '__main__': diff --git a/pkgs/applications/editors/jetbrains/update_ides.py b/pkgs/applications/editors/jetbrains/update_ides.py index eca3eb5763a5..9008906bde75 100755 --- a/pkgs/applications/editors/jetbrains/update_ides.py +++ b/pkgs/applications/editors/jetbrains/update_ides.py @@ -122,8 +122,7 @@ for name in toVersions.keys(): # Commit the result logging.info("#### Committing changes... ####") -subprocess.run(['git', 'add', versions_file_path], check=True) -subprocess.run(['git', 'commit', '--file=-'], input=commitMessage.encode(), check=True) +subprocess.run(['git', 'commit', f'-m{commitMessage}', '--', f'{versions_file_path}'], check=True) logging.info("#### Updating plugins ####") plugin_script = current_path.joinpath("plugins/update_plugins.py").resolve()