From 0f09f340e2a90fe3b71b8fb4e96553a478c8e5a5 Mon Sep 17 00:00:00 2001 From: Takashi Masuda Date: Tue, 31 Oct 2023 12:14:44 +0900 Subject: [PATCH] Fix broken `open-setting` sub command --- lib/open_settings.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/open_settings.go b/lib/open_settings.go index e7d6c14..0836452 100644 --- a/lib/open_settings.go +++ b/lib/open_settings.go @@ -10,7 +10,12 @@ import ( func OpenSettings() error { var settings Settings - if err := settings.Init(getGistID(), ""); err != nil { + accessToken, err := getAccessToken() + if err != nil { + return err + } + + if err := settings.Init(getGistID(), accessToken); err != nil { return nil }