Skip to content

don't attempt to purge modules/pending if the module updater is disabled anyway - #262

Open
jemand771 wants to merge 1 commit into
GooseMod:mainfrom
jemand771:purge-pending-if-not-skipmodule
Open

jemand771 wants to merge 1 commit into
GooseMod:mainfrom
jemand771:purge-pending-if-not-skipmodule

Conversation

@jemand771

Copy link
Copy Markdown

if checkModules() is never run, there's no point in precreating the dir. fixes installation on readonly filesystems (bwrap from nixpkgs, flatpak, ...)

this is an (imo cleaner) alternative to #250 but achieves the same thing (cc @slimelia)

…abled anyway

if `checkModules()` is never run, there's no point in precreating the dir.
fixes installation on readonly filesystems (bwrap from nixpkgs, flatpak, ...)
jemand771 added a commit to jemand771/nixpkgs that referenced this pull request Nov 3, 2026
VeilSilence added a commit to VeilSilence/OpenAsar that referenced this pull request Nov 4, 2026
On read-only installs (nix store under bwrap, flatpak) basePath points at a
directory the process cannot write: Discord's modules dir is staged as a
symlink into the nix store, and installed.json inside it is root-owned and
read-only. init() then ran fs.rmSync(downloadPath) + mkdir(downloadPath) and
got EROFS, threw out of app.whenReady().then(startUpdate), and the app never
reached splash.initSplash() -- the process tree lived on with no window,
which is what it looked like from the outside.

With SKIP_MODULE_UPDATE set (the nix module sets it) the purge is pointless:
checkModules() never runs, so pending/ is never used.

Upstream: GooseMod#262
Nixpkgs:  NixOS/nixpkgs#582751
VeilSilence added a commit to VeilSilence/OpenAsar that referenced this pull request Nov 4, 2026
On read-only installs (nix store under bwrap, flatpak) basePath points at a
directory the process cannot write: Discord's modules dir is staged as a
symlink into the nix store and installed.json inside it is root-owned. init()
then ran fs.rmSync(downloadPath) + mkdir(downloadPath), got EROFS, threw out
of app.whenReady().then(startUpdate), and the app never reached
splash.initSplash() -- the process tree lived on with no window.

With SKIP_MODULE_UPDATE set (what the nix module writes) the purge is
pointless: checkModules() never runs, so pending/ is never used.

Verified on Discord PTB 1.0.225a with modules/ symlinked into the nix store:
unfixed -> no window at all, fixed -> window at 20s.

Upstream: GooseMod#262
Nixpkgs:  NixOS/nixpkgs#582751
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

Successfully merging this pull request may close these issues.

1 participant