{"record":{"id":"66f719104a1637ce","repo":"GopeedLab/gopeed","slug":"failed-to-get-mount-point-from-hdiutil-output-s","errorCode":null,"errorMessage":"failed to get mount point from hdiutil output: %s","messagePattern":"failed to get mount point from hdiutil output: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/updater/updater_darwin.go","lineNumber":41,"sourceCode":"\t}\n\n\tmountPoint := \"\"\n\tfor _, line := range strings.Split(string(output), \"\\n\") {\n\t\tif strings.Contains(line, \"/Volumes/\") {\n\t\t\t// Find the /Volumes/ path in the line\n\t\t\t// hdiutil output format: /dev/disk4s1  Apple_HFS  /Volumes/Gopeed\n\t\t\t// or with sequence number: /dev/disk4s1  Apple_HFS  /Volumes/Gopeed 1\n\t\t\tidx := strings.Index(line, \"/Volumes/\")\n\t\t\tif idx != -1 {\n\t\t\t\t// Extract everything from /Volumes/ onwards and trim whitespace\n\t\t\t\tmountPoint = strings.TrimSpace(line[idx:])\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif mountPoint == \"\" {\n\t\treturn fmt.Errorf(\"failed to get mount point from hdiutil output: %s\", string(output))\n\t}\n\n\t// Detach the mounted DMG\n\tdefer exec.Command(\"hdiutil\", \"detach\", mountPoint, \"-quiet\").Run()\n\n\tmatches, err := filepath.Glob(filepath.Join(mountPoint, \"*.app\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(matches) == 0 {\n\t\treturn fmt.Errorf(\"no .app found in dmg, mountPoint: %s\", mountPoint)\n\t}\n\n\tkillSignalChan <- nil\n\n\t// Copy the new app to the destination\n\t// cp -Rf /Volumes/GoPeed/GoPeed.app /Applications\n\tif err := exec.Command(\"cp\", \"-Rf\", matches[0], appPath).Run(); err != nil {","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/GopeedLab/gopeed/blob/7b7327ffb30816273a74b142cccc0bc10c5a4c67/cmd/updater/updater_darwin.go#L23-L59","documentation":"Error \"failed to get mount point from hdiutil output: %s\" thrown in GopeedLab/gopeed.","triggerScenarios":"Thrown at cmd/updater/updater_darwin.go:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b7327ffb30816273a74b142cccc0bc10c5a4c67","analyzedAt":"2026-08-16T02:51:03.250Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}