{"record":{"id":"c7d07b587dac7f6b","repo":"Jguer/yay","slug":"no-target-directories-specified","errorCode":null,"errorMessage":"no target directories specified","messagePattern":"no target directories specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"local_install.go","lineNumber":69,"sourceCode":"\t\t}\n\n\t\treturn nil\n\t}\n\n\treturn fmt.Errorf(\"%w: %s\", ErrNoBuildFiles, targetDir)\n}\n\nfunc installLocalPKGBUILD(\n\tctx context.Context,\n\trun *runtime.Runtime,\n\tcmdArgs *parser.Arguments,\n\tdbExecutor db.Executor,\n) error {\n\taurCache := run.AURClient\n\tnoCheck := strings.Contains(run.Cfg.MFlags, \"--nocheck\")\n\n\tif len(cmdArgs.Targets) < 1 {\n\t\treturn errors.New(gotext.Get(\"no target directories specified\"))\n\t}\n\n\tsrcInfos := map[string]*gosrc.Srcinfo{}\n\tfor _, targetDir := range cmdArgs.Targets {\n\t\tif err := srcinfoExists(ctx, run.CmdBuilder, targetDir); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tpkgbuild, err := gosrc.ParseFile(filepath.Join(targetDir, \".SRCINFO\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", gotext.Get(\"failed to parse .SRCINFO\"), err)\n\t\t}\n\n\t\tsrcInfos[targetDir] = pkgbuild\n\t}\n\n\tgrapher := dep.NewGrapher(dbExecutor, aurCache, false, settings.NoConfirm,\n\t\tcmdArgs.ExistsDouble(\"d\", \"nodeps\"), noCheck, cmdArgs.ExistsArg(\"needed\"),","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/Jguer/yay/blob/328f4b4939fb35f38c2f7c7ce3b8638a839bafa5/local_install.go#L51-L87","documentation":"Returned by installLocalPKGBUILD when the -B/--build operation was invoked with an empty target list (cmdArgs.Targets has no entries). Local build mode requires at least one directory path to a PKGBUILD; without targets there is nothing to install, so the function aborts before touching the filesystem.","triggerScenarios":"Thrown at local_install.go:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass at least one directory containing a PKGBUILD, e.g. 'yay -B ./my-package-dir'","Use 'yay -B .' to build from the current directory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"328f4b4939fb35f38c2f7c7ce3b8638a839bafa5","analyzedAt":"2026-09-07T16:45:12.608Z","contentChangedAt":"2026-09-07T16:45:12.608Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}