commit 7613e88ad973c1588316ede86b21415f1179b5b8
parent cb4515e735fac2892730f96e2900256faea0629b
Author: Sean Enck <sean@ttypty.com>
Date: Sat, 16 Jul 2022 16:09:48 -0400
get clipboard later
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/cmd/lb/main.go b/cmd/lb/main.go
@@ -142,14 +142,7 @@ func main() {
fs := store.NewFileSystemStore()
inEntry := getEntry(fs, args, startEntry)
opts := subcommands.DisplayOptions{Dump: isDump, Entry: inEntry, Show: command == "show" || isDump, Glob: getEntry(fs, []string{"***"}, 0), Store: fs}
- clipboard := platform.Clipboard{}
var err error
- if !opts.Show {
- clipboard, err = platform.NewClipboard()
- if err != nil {
- misc.Die("unable to get clipboard", err)
- }
- }
dumpData, err := subcommands.DisplayCallback(opts)
if err != nil {
misc.Die("display command failed to retrieve data", err)
@@ -167,6 +160,13 @@ func main() {
fmt.Println(string(d))
return
}
+ clipboard := platform.Clipboard{}
+ if !opts.Show {
+ clipboard, err = platform.NewClipboard()
+ if err != nil {
+ misc.Die("unable to get clipboard", err)
+ }
+ }
for _, obj := range dumpData {
if opts.Show {
if obj.Path != "" {