diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 21:00:34 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | fcf916d138fd0622b1a055e9742508e2e216ef17 (patch) | |
tree | 22ff3120faeee81f19ed9f5ec85052ed6e0ab848 /pkg/gui/patch_building_panel.go | |
parent | f3c87bde889ca6c88bf50a97e5aa362ec713ef0b (diff) |
don't panic
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r-- | pkg/gui/patch_building_panel.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index 6e2bcf8af..b44876f68 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -125,7 +125,11 @@ func (gui *Gui) secondaryPatchPanelUpdateOpts() *viewUpdateOpts { func (gui *Gui) handleCopyPatchToClipboard() error { // TODO: test that this works - return gui.OSCommand.CopyToClipboard( + if err := gui.OSCommand.CopyToClipboard( strings.Join(gui.GitCommand.PatchManager.RenderEachFilePatch(true), "\n"), - ) + ); err != nil { + return gui.surfaceError(err) + } + + return nil } |