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

Don't touch sources.json when update has no changes? #101

Open
will opened this issue Oct 2, 2024 · 0 comments
Open

Don't touch sources.json when update has no changes? #101

will opened this issue Oct 2, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@will
Copy link

will commented Oct 2, 2024

Hi, thanks for npins!

I was wondering if it'd be possible to not touch the npins/sources.json file after running npins update and there weren't any changes?

❯ ls -la npins/sources.json
.rw-r--r-- will staff 13 KB Wed Oct  2 13:56:29 2024 npins/sources.json

❯ npins update
... omitting several lines, all  (no changes)
[INFO ] Update successful.
evaluating derivation 'git+file:///Users/will/code/verycoolproject#devShells.aarch64-darwin.default'direnv: ([/nix/store/439f5yi8i1akxl2669f5mam6iacisycv-direnv-2.34.0/bin/direnv export fish]) is taking a while to execute. Use CTRL-C to give up.

❯ ls -la npins/sources.json
.rw-r--r-- will staff 13 KB Wed Oct  2 13:57:39 2024 npins/sources.json

The contents of the file do not change, which is expected, but the timestamp changes. This seems to cause direnv to reload the devshell, since I have it watching that file.

It's not the end of the world, but it'd be nice to not have to wait for the nix re-evaluation when it's not necessary.

@piegamesde piegamesde added good first issue Good for newcomers enhancement New feature or request labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants