sh icon indicating copy to clipboard operation
sh copied to clipboard

POC: Add lazy resolving of command paths

Open ecederstrand opened this issue 3 years ago • 1 comments

Defer resolving of the actual command path to when the command is called, not when it's imported. This allows providing a custom PATH via _env to customize resolving of the command path.

Remove test case that only tested if the mocker works.

NOTE: this is just a proof of concept of how lazy resolving could work. See discussions in https://github.com/amoffat/sh/pull/602

ecederstrand avatar Aug 08 '22 06:08 ecederstrand

I think this might have to go into the 2.0.0 branch instead of develop, since it changes the public behavior (though not the interface). If the 1.* users are relying on exceptions to happen on import, this will be unexpected. If you don't disagree, would you mind changing the destination branch to release/2.0.0 please?

amoffat avatar Aug 12 '22 17:08 amoffat

Closing for now, but we can revisit in the future. Good work on the POC

amoffat avatar Feb 09 '23 20:02 amoffat