Skip to content

fix: Don't invoke pager with shell on Windows #4386

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged

fix: Don't invoke pager with shell on Windows #4386

merged 1 commit into from
Apr 10, 2025

Conversation

twpayne
Copy link
Owner

@twpayne twpayne commented Mar 30, 2025

Fixes #4375.
Fixes #4195.

@LeonardoMor
Copy link

Found #4195 locked so I could not reply there.

I can test it, but it'd be a few days before I touch Windows again.

Speaking of which, on Windows 11, if you update chezmoi with

winget update chezmoi

You'll get an error saying something about not having the proper permissions on some folder.

If you repeat as Administrator, the upgrade fails again.

I have been able to reproduce this in two Windows 11 computers.

Should I open an issue for this?

@halostatue
Copy link
Collaborator

Found #4195 locked so I could not reply there.

I have unlocked that conversation.

Speaking of which, on Windows 11, if you update chezmoi with

Should I open an issue for this?

I would check to see if there are issues reported with winget or check with that. As I understand it, chezmoi does not control how winget updates are performed, but merely makes them available when new releases are built.

@twpayne
Copy link
Owner Author

twpayne commented Mar 30, 2025

Speaking of which, on Windows 11, if you update chezmoi with

Should I open an issue for this?

I would check to see if there are issues reported with winget or check with that. As I understand it, chezmoi does not control how winget updates are performed, but merely makes them available when new releases are built.

This is correct. This is a winget issue, not a chezmoi issue.

@LeonardoMor
Copy link

Got it. I'd look into that. It's strange that it happens with chezmoi and not other things that I install with winget, say vim, nvim and so on.

I thought chezmoi would have some control over what and how things are copied and so on.

@twpayne
Copy link
Owner Author

twpayne commented Mar 30, 2025

I thought chezmoi would have some control over what and how things are copied and so on.

Nope, chezmoi is just a dumb statically-linked binary. You can see everything in the winget PR for the last chezmoi release: microsoft/winget-pkgs#241817

@twpayne twpayne changed the title fix: Don't invoke pager with shell on Windows fix: Always invoke diff.pager through shell on Windows Apr 6, 2025
@twpayne twpayne force-pushed the fix-4375 branch 3 times, most recently from 72c8d0e to f387191 Compare April 6, 2025 18:31
@LeonardoMor
Copy link

The winget problem went away on its own.

@twpayne twpayne changed the title fix: Always invoke diff.pager through shell on Windows fix: Don't invoke pager with shell on Windows Apr 10, 2025
@twpayne twpayne marked this pull request as ready for review April 10, 2025 08:08
@twpayne twpayne merged commit 55bad30 into master Apr 10, 2025
32 checks passed
@twpayne twpayne deleted the fix-4375 branch April 10, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

diff subcommand not respecting env.SHELL on windows Lines of diff output are executed as commands on Windows
3 participants