diff --git a/backend/utils/convert/pickle_convert.go b/backend/utils/convert/pickle_convert.go index 4d945d0..61279b6 100644 --- a/backend/utils/convert/pickle_convert.go +++ b/backend/utils/convert/pickle_convert.go @@ -1,6 +1,9 @@ package convutil -import "os/exec" +import ( + "os/exec" + "runtime" +) type PickleConvert struct { CmdConvert @@ -49,6 +52,14 @@ func NewPickleConvert() *PickleConvert { } } // check if pickle available + if runtime.GOOS == "darwin" { + // the xcode-select installation prompt may appear on macOS + // so check it manually in advance + if _, err = exec.LookPath("xcode-select"); err != nil { + return nil + } + } + if _, err = runCommand(c.DecodePath, "-c", "import pickle"); err != nil { return nil }