Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit/check-merge-conflicts-2: fix use outside dev shell (backport #12373) #12434

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 7, 2025

Note that this is just a script that is meant to run outside a derivation (but also can be called by a derivation builder). touch $out does not belong in it.

touch $out worked accidentally in the derivation-based check, and also in the dev shell, but if pre-commit is invoked without the dev shell it would fail.

Motivation

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.


This is an automatic backport of pull request #12373 done by [Mergify](https://mergify.com).

Copy link
Contributor Author

mergify bot commented Feb 7, 2025

Cherry-pick of 77a8386 has failed:

On branch mergify/bp/2.24-maintenance/pr-12373
Your branch is ahead of 'origin/2.24-maintenance' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 77a838602.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   tests/functional/git-hashing/simple.sh

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   tests/functional/git-hashing/fixed.sh

Cherry-pick of 414c346 has failed:

On branch mergify/bp/2.24-maintenance/pr-12373
Your branch is ahead of 'origin/2.24-maintenance' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 414c34656.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   tests/functional/help.sh

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added automatic backport This PR is a backport produced by automation (does not trigger backporting) conflicts merge-queue labels Feb 7, 2025
@mergify mergify bot requested a review from edolstra as a code owner February 7, 2025 11:07
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Feb 7, 2025
Note that this is just a script that is meant to run outside a
derivation (but also can be called by a derivation builder).
`touch $out` does not belong in it.

`touch $out` worked accidentally in the derivation-based check,
and also in the dev shell, but if pre-commit is invoked without
the dev shell it would fail.
This seems to be the way to do it now, even though I can't run them
without setting at least one env var.
I'll only fix shellcheck for now. Don't shoot the messenger.

It isn't quite clear to me why the previous commit masked this problem,
but I'm glad shellcheck has an effect or more effect now.
@roberth roberth force-pushed the mergify/bp/2.24-maintenance/pr-12373 branch from dcb4de5 to fcea626 Compare February 10, 2025 14:11
@mergify mergify bot merged commit 0f5f242 into 2.24-maintenance Feb 10, 2025
27 checks passed
@mergify mergify bot deleted the mergify/bp/2.24-maintenance/pr-12373 branch February 10, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automatic backport This PR is a backport produced by automation (does not trigger backporting) conflicts merge-queue with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant