pluveto / upgit

Another upload hub that supports clipboard. It works well with Typora, Snipaste, VSCode.
MIT License
535 stars 44 forks source link

Upload clipboard fail on mac #22

Closed xieyx closed 2 years ago

xieyx commented 2 years ago

upgit :clipboard -V

[TRACE] LocalPaths = [':clipboard']
        TargetDir = ''
        Verbose = true
        Wait = false
        Clean = false
        Raw = false
        NoLog = false
        Uploader = ''
        OutputType = 'stdout'
        OutputFormat = 'url'
        ApplicationPath = ''
[TRACE] default_uploader = 'github'
        rename = '{year}/{month}/upgit_{year}{month}{day}_{unixts}{ext}'
        [output_formats]
        bbcode = '[img]{url}[/img]'
        html = '<img src="{url}" />'
        markdown = '![{url_fname}]({url})'
        markdown-simple = '![]({url})'
        url = '{url}'
panic: clipboard: cannot use when CGO_ENABLED=0

goroutine 1 [running]:
golang.design/x/clipboard.initialize(...)
    /home/runner/go/pkg/mod/golang.design/x/clipboard@v0.6.0/clipboard_nocgo.go:9
golang.design/x/clipboard.Init(...)
    /home/runner/go/pkg/mod/golang.design/x/clipboard@v0.6.0/clipboard.go:102
main.loadClipboard()
    /home/runner/work/upgit/upgit/main.go:343 +0xa4
main.mainCommand()
    /home/runner/work/upgit/upgit/main.go:53 +0x9c
main.main()
    /home/runner/work/upgit/upgit/main.go:39 +0xb8
pluveto commented 2 years ago

I tried to add CGO_ENABLED=1 when building. Try v0.2.11 prerelease.

pluveto commented 2 years ago

Seems the build failed. I'll setup a macOS build agent. Wait a minute.

pluveto commented 2 years ago

Try it now

------------------ Original ------------------ From: coolhub @.> Date: Wed,Feb 9,2022 2:10 PM To: pluveto/upgit @.> Cc: Subscribed @.***> Subject: Re: [pluveto/upgit] Upload clipboard fail on mac (Issue #22)

upgit :clipboard -V [TRACE] LocalPaths = [':clipboard'] TargetDir = '' Verbose = true Wait = false Clean = false Raw = false NoLog = false Uploader = '' OutputType = 'stdout' OutputFormat = 'url' ApplicationPath = '' [TRACE] defaultuploader = 'github' rename = '{year}/{month}/upgit{year}{month}{day}_{unixts}{ext}' [output_formats] bbcode = '[img]{url}[/img]' html = '' markdown = '' markdown-simple = '' url = '{url}' panic: clipboard: cannot use when CGO_ENABLED=0

goroutine 1 [running]: golang.design/x/clipboard.initialize(...) @./clipboard_nocgo.go:9 golang.design/x/clipboard.Init(...) @./clipboard.go:102 main.loadClipboard() /home/runner/work/upgit/upgit/main.go:343 +0xa4 main.mainCommand() /home/runner/work/upgit/upgit/main.go:53 +0x9c main.main() /home/runner/work/upgit/upgit/main.go:39 +0xb8

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

xieyx commented 2 years ago

OK. Pre-release v0.2.11 fixed.