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

[BUG] Conventional Commits: Cannot read properties of undefined (reading 'fsPath') #262

Open
nrome-n opened this issue Aug 27, 2022 · 6 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nrome-n
Copy link

nrome-n commented Aug 27, 2022

Describe the bug

A clear and concise description of what the bug is.

when the command extension.conventionalCommits in used from the touch bar there is a problem with the 'fsPath'

To reproduce

Steps to reproduce the behavior:

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

adding touchBar support in the add or from a custom extantion

		"touchBar": [
			{
				"command": "extension.conventionalCommits",
				"group": "cpcmd"
			}
		  ]

with give Conventional Commits: Cannot read properties of undefined (reading 'fsPath')

Expected behavior

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

Screenshots

If applicable, add screenshots to help explain your problem.

Application logs

Follow the troubleshooting section and paste the logs here.

@nrome-n nrome-n added the help wanted Extra attention is needed label Aug 27, 2022
@nrome-n
Copy link
Author

nrome-n commented Aug 27, 2022

the fsPath issue is happening when a file is open but is no file is open it is working fine. is that helps thank u for the great work

@vivaxy vivaxy added the bug Something isn't working label Aug 30, 2022
@vivaxy
Copy link
Owner

vivaxy commented Aug 30, 2022

Hi @nrome-n, as far as I know, VSCode does not provider a way to add any custom extension into touch bar.

How to config touch bar like?

"touchBar": [
  {
    "command": "extension.conventionalCommits",
    "group": "cpcmd"
  }
]

@nrome-n
Copy link
Author

nrome-n commented Sep 1, 2022

Thank @vivaxy this is what i did then when i try to use it, i get this Conventional Commits: Cannot read properties of undefined (reading 'fsPath')

in vscode if you add

    "menus": {
      "touchBar": [

        {
          "command": "extension.conventionalCommits",
          "group": "quickgit",
          "when": "config.touchbarCommandPalette.commitAll"
        },


       
      ]
    },

to package.json it will add the shortcut to the touchbar

@nrome-n
Copy link
Author

nrome-n commented Sep 1, 2022

from what i can gather the issue is from getRepository and fsPath maybe the variable is no there when a file is open
so maybe the function extension.conventionalCommits when run from CP targets the window not the a file or sometime not sure

image

but when i close every file it works

image

this the touch bar

image

thanks for responding

@yi-Xu-0100
Copy link
Collaborator

@nrome-n This test extension may solve this issue to some extent, but I'm not sure whether it will be able to complete the successful setup of the shortcut. Give this a try and let me know how it helps. 😁

@nrome-n
Copy link
Author

nrome-n commented May 19, 2023

@yi-Xu-0100 added the extension but when i did the action this time i got Conventional Commits: Repository not found in path: path of the file that was open
Really sorry for the late reply. 😅


when using the org extension i am getting
Conventional Commits: Repository not found in path: vivaxy.vscode-conventional-commits/extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants