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

Panic with open folder\ on Windows #3351

Closed
T-Diedrich opened this issue Jun 15, 2024 · 2 comments
Closed

Panic with open folder\ on Windows #3351

T-Diedrich opened this issue Jun 15, 2024 · 2 comments

Comments

@T-Diedrich
Copy link

micro panics on Windows when trying to open a folder from a command, e.g. open folder\.

The resulting backtrace is

Micro encountered an error: runtime.boundsError runtime error: index out of range [0] with length 0
runtime/panic.go:114 (0xada2dc)
github.com/kballard/[email protected]/unquote.go:88 (0xf063af)
github.com/kballard/[email protected]/unquote.go:59 (0xf05b85)
github.com/zyedidia/micro/v2/internal/action/command.go:963 (0xf3be9d)
github.com/zyedidia/micro/v2/internal/action/actions.go:1330 (0xf2bfe9)
github.com/zyedidia/micro/v2/internal/info/infobuffer.go:152 (0xf08305)
github.com/zyedidia/micro/v2/internal/action/infopane.go:206 (0xf3ff7f)
github.com/zyedidia/micro/v2/internal/action/infopane.go:54 (0xf3f151)
github.com/zyedidia/micro/v2/internal/action/infopane.go:129 (0xf3f8ef)
github.com/zyedidia/micro/v2/internal/action/infopane.go:93 (0xf3f5ce)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:474 (0xf776f4)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:394 (0xf76fac)
runtime/internal/atomic/types.go:194 (0xadf112)
runtime/asm_amd64.s:1650 (0xb0ea21)

This happens whether the folder exists or not and is especially annoying because it is suggested by the autocompletion feature.

On Linux, for open folder/, an error Error: folder/ is a directory and cannot be opened is shown, or Error parsing args Unterminated backslash-escape for open folder\, both of which would be preferable.

Commit hash: 68d88b5
OS: Windows 11 (Pro) x86_64
Terminal: Windows Terminal 1.20.11381.0

@niten94
Copy link
Contributor

niten94 commented Jun 17, 2024

The bug is not fixed but I think it is the same with the bug reported in this issue: #2666

@JoeKar
Copy link
Collaborator

JoeKar commented Aug 25, 2024

Closed as duplicate of #2666 and already addressed with zyedidia/go-shellquote#1.

@JoeKar JoeKar closed this as completed Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants