Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interation mode can't process file path right with space #33

Closed
zlj-zz opened this issue May 16, 2022 · 1 comment
Closed

Interation mode can't process file path right with space #33

zlj-zz opened this issue May 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@zlj-zz
Copy link
Owner

zlj-zz commented May 16, 2022

Describe the bug

Interation mode can't process file path right with space

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Or show your code:

    def switch_file_status(self, file: Union[File, str], path: Optional[str] = None):
        path = path or self.op_path
        file_name = self._get_file_str(file)

        if file.has_merged_conflicts or file.has_inline_merged_conflicts:
            pass
        elif file.has_unstaged_change:
            exec_cmd(f"git add -- {file_name}", cwd=path)
        elif file.has_staged_change:
            if file.tracked:
                exec_cmd(f"git reset HEAD -- {file_name}", cwd=path)
            else:
                exec_cmd(f"git rm --cached --force -- {file_name}", cwd=path)

File path like this:

图片

And the below code can't process it right. Because:

图片

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS
  • Version v1.5.2
@zlj-zz zlj-zz added the bug Something isn't working label May 16, 2022
@zlj-zz
Copy link
Owner Author

zlj-zz commented May 20, 2022

#34 fix this.

@zlj-zz zlj-zz closed this as completed May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant