-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/run: Optimize 'enter' and 'run' in the non-fallback case
Currently, the 'enter' command involves two extra invocations of 'podman exec' to detect if the user's chosen shell and current working directory are present inside the toolbox container. Each invocation is sufficiently expensive to add a noticeable overhead to the 'enter' and 'run' commands. Moreover, file system operations being inherently racy, it's always better to detect errors and handle them instead of trying to pre-emptively avoid them. Therefore, this shuffles the code around to attempt the non-fallback invocation, and then handle the errors by attempting a series of fallbacks for the command and the current working directory. #813
- Loading branch information
1 parent
323afb9
commit 3b57aac
Showing
1 changed file
with
75 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters