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.