go-delve/delve · error

no output path specified

Error message

no output path specified

What it means

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.

Source

Thrown at pkg/terminal/command.go:3514

			disable = true
		default:
			if path != "" || strings.HasPrefix(arg, "-") {
				return fmt.Errorf("unrecognized option %q", arg)
			} else {
				path = arg
			}
		}
	}

	if disable {
		if path != "" {
			return errors.New("-o option specified with an output path")
		}
		return t.stdout.CloseTranscript()
	}

	if path == "" {
		return errors.New("no output path specified")
	}

	flags := os.O_APPEND | os.O_WRONLY | os.O_CREATE
	if truncate {
		flags |= os.O_TRUNC
	}
	fh, err := os.OpenFile(path, flags, 0660)
	if err != nil {
		return err
	}

	if err := t.stdout.CloseTranscript(); err != nil {
		return err
	}

	t.stdout.TranscribeTo(fh, fileOnly)
	return nil
}

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Add an output path: 'save -o /tmp/delve-transcript.txt'.
  2. Include the truncate flag if you want to overwrite instead of append: 'save -o <path> -t' (see flags handling).
  3. Check that the path argument is not consumed by another flag; pass it explicitly with -o.

Example fix

// before
save
// after
save -o /tmp/delve-transcript.txt
Defensive patterns

Strategy: validation

Validate before calling

if !disable && path == "" { return errors.New("transcript requires -o <path>") }

Prevention

When it happens

Trigger: 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.

Common situations: Forgetting '-o' entirely, or passing only other flags (like truncate) expecting a default transcript file.

Related errors


AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31). Data as JSON: /api/errors/b55de0d7650bae59. Report an issue: GitHub.