{"record":{"id":"b55de0d7650bae59","repo":"go-delve/delve","slug":"no-output-path-specified","errorCode":null,"errorMessage":"no output path specified","messagePattern":"no output path specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":3514,"sourceCode":"\t\t\tdisable = true\n\t\tdefault:\n\t\t\tif path != \"\" || strings.HasPrefix(arg, \"-\") {\n\t\t\t\treturn fmt.Errorf(\"unrecognized option %q\", arg)\n\t\t\t} else {\n\t\t\t\tpath = arg\n\t\t\t}\n\t\t}\n\t}\n\n\tif disable {\n\t\tif path != \"\" {\n\t\t\treturn errors.New(\"-o option specified with an output path\")\n\t\t}\n\t\treturn t.stdout.CloseTranscript()\n\t}\n\n\tif path == \"\" {\n\t\treturn errors.New(\"no output path specified\")\n\t}\n\n\tflags := os.O_APPEND | os.O_WRONLY | os.O_CREATE\n\tif truncate {\n\t\tflags |= os.O_TRUNC\n\t}\n\tfh, err := os.OpenFile(path, flags, 0660)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := t.stdout.CloseTranscript(); err != nil {\n\t\treturn err\n\t}\n\n\tt.stdout.TranscribeTo(fh, fileOnly)\n\treturn nil\n}","sourceCodeStart":3496,"sourceCodeEnd":3532,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L3496-L3532","documentation":"When the transcript command is not in disable mode, an output path is mandatory. If no path was given (via '-o <path>' or the positional argument), there is nowhere to write the transcript, so the command returns this error before opening the file with O_APPEND|O_WRONLY|O_CREATE.","triggerScenarios":"Running the transcript/save command without any output path and without the disable flag, e.g. 'save' with no arguments, or flags that consume all arguments without producing a path.","commonSituations":"Forgetting '-o' entirely, or passing only other flags (like truncate) expecting a default transcript file.","solutions":["Add an output path: 'save -o /tmp/delve-transcript.txt'.","Include the truncate flag if you want to overwrite instead of append: 'save -o <path> -t' (see flags handling).","Check that the path argument is not consumed by another flag; pass it explicitly with -o."],"exampleFix":"// before\nsave\n// after\nsave -o /tmp/delve-transcript.txt","handlingStrategy":"validation","validationCode":"if !disable && path == \"\" { return errors.New(\"transcript requires -o <path>\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always supply '-o <path>' when enabling a transcript.","Remember there is no default transcript file path.","Confirm flags did not consume the path value."],"tags":["cli","missing-argument","delve"],"backgroundTag":"missing-command-argument","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}