bb010g / betterdiscordctl

A utility for managing BetterDiscord on Linux.
MIT License
322 stars 13 forks source link

Rewrite for new BetterDiscord beta #120

Closed ObserverOfTime closed 3 years ago

ObserverOfTime commented 3 years ago

This change is Reviewable

bb010g commented 3 years ago

@ObserverOfTime Requesting review of my changes.

bb010g commented 3 years ago

Also, thank you for picking this up!

ObserverOfTime commented 3 years ago

betterdiscordctl, line 119 at r1 (raw file):

Previously, bb010g (bb010g) wrote…
Switching to `--bd-asar` would be fine, but do you think the option deserves to also be short? `--betterdiscord` had the benefit of working off of a plain Git repository, but `--bd-asar` works off of a build product. I think leaving `-a` open for other options would be better, as this is a more niche / dev-oriented flag?

It should be fine as we can always use -A if we end up needing it.

ObserverOfTime commented 3 years ago

betterdiscordctl, line 32 at r3 (raw file):

Previously, bb010g (bb010g) wrote…
As defaults, these values are okay. We set `xdg_config` but reassign it later in both `bdc_flatpak` & `bdc_snap`, which may be called from `bdc_main`. We can do the same for `bd_config` & `bd_asar`.
  1. Both of them are defined using the value of xdg_config before it is reassigned.
  2. betterdiscord.asar may not be in bd_config if the user specifies another file.
ObserverOfTime commented 3 years ago

Maybe we should merge this now and leave the option rework for another release?

bb010g commented 3 years ago

Sorry, other things had came up the past couple weeks. I'll get back to this and push what should be everything necessary tomorrow morning for review.

maxsupermanhd commented 3 years ago

I tested this today, works perfectly! I'm using snap and BetterDiscord does not support it at all but installing beta branch fixed all issues. (don't run Discord native, remote code execution is waiting to happen)

ObserverOfTime commented 3 years ago

remote code execution is waiting to happen

No, it's not.

TommyTran732 commented 3 years ago

It would be great if you could merge it and updae the AUR/COPR packages as they are not working right now :/

ObserverOfTime commented 3 years ago

Waiting for @bb010g to make some final changes.

bb010g commented 3 years ago

By the way, tested on my NixOS box with a Nixpkgs (nixos-unstable) Discord installation, and it installs & uninstalls perfectly.

bb010g commented 3 years ago

https://github.com/bb010g/betterdiscordctl/releases/v2.0.0

https://github.com/NixOS/nixpkgs/pull/124211

bb010g commented 3 years ago

https://aur.archlinux.org/cgit/aur.git/commit/?h=betterdiscordctl-git&id=f8438ee6a4eb11da184dfa26db86b7bdcb5b49c2