From 12c8a170ce367f0ad6f654920091129e7413f149 Mon Sep 17 00:00:00 2001 From: Jrelvas <55360900+Noted-Jrelvas@users.noreply.github.com> Date: Tue, 24 Oct 2023 21:33:18 +0100 Subject: [PATCH] binary: Moved setenv from pickCard into setup. --- internal/config/cardpick.go | 3 --- internal/config/config.go | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/config/cardpick.go b/internal/config/cardpick.go index 8f915a24..8d88d869 100644 --- a/internal/config/cardpick.go +++ b/internal/config/cardpick.go @@ -75,8 +75,5 @@ func (b *Binary) pickCard() error { } else { b.Env.Set("__GLX_VENDOR_LIBRARY_NAME", "mesa") } - - b.Env.Setenv() - return nil } diff --git a/internal/config/config.go b/internal/config/config.go index 2faf82b6..087b4b96 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -122,7 +122,12 @@ func (b *Binary) setup() error { return errors.New("invalid renderer given") } - return b.pickCard() + if err := b.pickCard(); err != nil { + return err + } + + b.Env.Setenv() + return nil } func (c *Config) setup() error {