Make better error when path does not exist#32
Draft
supersonic-copycat wants to merge 1 commit intosnoyberg:masterfrom
Draft
Make better error when path does not exist#32supersonic-copycat wants to merge 1 commit intosnoyberg:masterfrom
supersonic-copycat wants to merge 1 commit intosnoyberg:masterfrom
Conversation
doesDirExists returns False if either path does not exist or it's not a directory. If file dos not exists code execution goes to `getGitFilesForWorktree` and leads to misleading error message like \cygdrive\c\...\.git: openBinaryFile: does not exist (No such file or directory) while `.git` exists and is indeed a directory!
Author
|
As proof of concept I just print it on stderr and return empty list -- later it will cause another exception, but at least user will have some hint what to do. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is "brother-pull request" for #31
First, there should be no invalid paths, but if they happen, we got misleading error message (see issue 26).
doesDirExistsreturnsFalseif either path does not exist or it's not a directory. If file doesn't exists code execution goes togetGitFilesForWorktreeand leads to strange error message.So, we can also check if path exists at all and it's directory, so we can show user better error message.