environments: Don't load shell environments in non-local worktrees (#23138)

This fixes an error message that has shown up for me when joining collab
projects: "Unable to load shell environment in /<path on another
machine/"

Release Notes:

- Fixed error message about shell environment failing to load when
joining projects in collaboration.
91b36c31e8Thorsten Ball committed on 1/14/2025, 5:13:55 PM· committed by GitHubparent39ac6e4
1 file changedLine totals unavailable