From 250fe740b221e5d8b056e07a2e7acccdd70f886d Mon Sep 17 00:00:00 2001 From: Francisco Miamoto Date: Sun, 30 Aug 2020 11:31:19 -0300 Subject: [PATCH] use GetBool instead of casting --- pkg/gui/files_panel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 0a8e1fc28..2f44e566f 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -517,7 +517,7 @@ func (gui *Gui) pushWithForceFlag(v *gocui.View, force bool, upstream string, ar branchName := gui.getCheckedOutBranch().Name err := gui.GitCommand.Push(branchName, force, upstream, args, gui.promptUserForCredential) if err != nil && !force && strings.Contains(err.Error(), "Updates were rejected") { - forcePushDisabled := gui.Config.GetUserConfig().Get("git.disableForcePushing").(bool) + forcePushDisabled := gui.Config.GetUserConfig().GetBool("git.disableForcePushing") if forcePushDisabled { gui.createErrorPanel(gui.Tr.SLocalize("UpdatesRejectedAndForcePushDisabled")) return @@ -568,7 +568,7 @@ func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error { return gui.pushWithForceFlag(v, false, "", "") } - forcePushDisabled := gui.Config.GetUserConfig().Get("git.disableForcePushing").(bool) + forcePushDisabled := gui.Config.GetUserConfig().GetBool("git.disableForcePushing") if forcePushDisabled { return gui.createErrorPanel(gui.Tr.SLocalize("ForcePushDisabled")) }