Currently bdcli expected the --path given by user matched in the discovered list of paths
|
install = discord.ResolvePath(pathFlag) |
|
index := slices.IndexFunc(allDiscordInstalls[channel], func(d *DiscordInstall) bool { return d.CorePath == proposed }) |
Which causing manual path would fail when the internal path resolution failed
$ bdcli install -p ~/.config/discord/app-1.0.137/modules/discord_desktop_core-1/discord_desktop_core/
Error: could not find a valid Discord installation at ***/.config/discord/app-1.0.137/modules/discord_desktop_core-1/discord_desktop_core/
Usage:
bdcli install [flags]
Aliases:
install, reinstall
Flags:
-c, --channel string Discord release channel (stable|ptb|canary) (default "stable")
-h, --help help for install
-p, --path string Path to a Discord installation
Global Flags:
--silent Suppress non-error output
could not find a valid Discord installation at ***/.config/discord/app-1.0.137/modules/discord_desktop_core-1/discord_desktop_core/
Suggestion:
Validate the --path by checking the existence of package.json or even the content of it
Related to: #8 (comment)
Currently
bdcliexpected the--pathgiven by user matched in the discovered list of pathscli/cmd/install.go
Line 39 in a933d31
cli/internal/discord/paths.go
Line 78 in a933d31
Which causing manual path would fail when the internal path resolution failed
Suggestion:
Validate the
--pathby checking the existence ofpackage.jsonor even the content of itRelated to: #8 (comment)