Closed Lockszmith-GH closed 1 year ago
Thank you very much for reporting this. #2356 fixes the immediate issue.
Do you think that chezmoi should have an "offline" mode, e.g. an extra flag like --network=false
that disables all operations that need a network connection?
Thank for taking a look at this and providing a fix.
Do you think that chezmoi should have an "offline" mode, e.g. an extra flag like
--network=false
that disables all operations that need a network connection?
Good question. More features = more trouble... however, slow connections is something that happens. I doubt I'll encounter this again in the future myself, might be a good idea to keep tracking this and if this becomes an issue for others, then adding it would be beneficial.
If you do consider this, I would probably make it a 'level' of --dry-run
, in which dry by default only skips 'touching' the local system and an offline mode where it skips 'touching' other systems as well.
In anyway, I thank you truly for making this tool and even more for maintaining it.
Describe the bug
I'm on a cruise ship in vacation, had to pull out my laptop to perform some quick operation. My terminal shell-initialization script was not initializing, and I discovered that it was stuck on a call to
chezmoi source-path
which I store in an environment variable.Using the
--verbose
and--debug
flags, it shows thatchezmoi
is performing some very slow operations even when it should not.Problem (1) - the somewhat severe: The operation lingers for ~11 seconds with a ReadFile of a cached binary file. (one-before last line in output below)
Problem (2) - the VERY severe one In my
.chezmoiexternal.toml
I have a reference to some external resources, and those are queried which causes the operation to hang - because of my slow connection.To reproduce
Connect to a VERY SLOW internet connection (I believe completely offline will just fail the calls, and will not reproduce it) and run
chezmoi source-path
Expected behavior
A quick operation, returning the source-path, never reaching out to online resources, or at least a way to flag to chezmoi that we're offline.
Output of command with the
--verbose
flagOutput of
chezmoi doctor