mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
Allow to execute update script in CI environment
If the script is executed in a CI (like in github actions, with the install-nix-action) it fails. This changes fixes that use case. In that scenario, you should provide the --no-commit flag.
This commit is contained in:
parent
130496a800
commit
b891957a97
1 changed files with 1 additions and 1 deletions
|
@ -547,7 +547,6 @@ def update_plugins(editor: Editor, args):
|
|||
|
||||
log.setLevel(LOG_LEVELS[args.debug])
|
||||
log.info("Start updating plugins")
|
||||
nixpkgs_repo = git.Repo(editor.root, search_parent_directories=True)
|
||||
update = editor.get_update(args.input_file, args.outfile, args.proc)
|
||||
|
||||
redirects = update()
|
||||
|
@ -556,6 +555,7 @@ def update_plugins(editor: Editor, args):
|
|||
autocommit = not args.no_commit
|
||||
|
||||
if autocommit:
|
||||
nixpkgs_repo = git.Repo(editor.root, search_parent_directories=True)
|
||||
commit(nixpkgs_repo, f"{editor.attr_path}: update", [args.outfile])
|
||||
|
||||
if redirects:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue