aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/pulse.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-12 21:07:05 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-12 21:07:05 +0900
commitda6d238d8a15fa583b384b547decbddcda28ff8b (patch)
treee0f8b1364fa09e5a5ec7a1d0e86d13c475cde3eb /internal/app/pulse.go
parentb0aff891661dfa2f438a7264607a4e6e9caef026 (diff)
verbose: remove system package interaction
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app/pulse.go')
-rw-r--r--internal/app/pulse.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/app/pulse.go b/internal/app/pulse.go
index 848ac717..d7e08ba9 100644
--- a/internal/app/pulse.go
+++ b/internal/app/pulse.go
@@ -11,6 +11,7 @@ import (
"git.ophivana.moe/cat/fortify/internal/state"
"git.ophivana.moe/cat/fortify/internal/system"
"git.ophivana.moe/cat/fortify/internal/util"
+ "git.ophivana.moe/cat/fortify/internal/verbose"
)
func (a *App) SharePulse() {
@@ -49,9 +50,7 @@ func (a *App) SharePulse() {
pulseCookieSource := util.DiscoverPulseCookie()
pulseCookieFinal := path.Join(system.V.Share, "pulse-cookie")
a.AppendEnv(util.PulseCookie, pulseCookieFinal)
- if system.V.Verbose {
- fmt.Printf("Publishing PulseAudio cookie '%s' to '%s'\n", pulseCookieSource, pulseCookieFinal)
- }
+ verbose.Printf("Publishing PulseAudio cookie '%s' to '%s'\n", pulseCookieSource, pulseCookieFinal)
if err = util.CopyFile(pulseCookieFinal, pulseCookieSource); err != nil {
state.Fatal("Error copying PulseAudio cookie:", err)
}
@@ -61,8 +60,6 @@ func (a *App) SharePulse() {
state.RegisterRevertPath(pulseCookieFinal)
}
- if system.V.Verbose {
- fmt.Printf("PulseAudio dir '%s' configured\n", pulse)
- }
+ verbose.Printf("PulseAudio dir '%s' configured\n", pulse)
}
}