Dashboard › cli › Distillation
d3c6753e-d640-43ff-8abe-66d8abf1b4d1["lore_tm_v1_4e8FKyTRiFoOxTxaj15K8hSmw_PIT4GKTdPd8INq-ig"]
parseSlashSeparatedArg() in /home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/arg-parsing.ts are hex strings that never contain /; therefore, any slash means the input must be a structured org/project/id or an org/project target missing its ID.parseSlashSeparatedArg(arg, idLabel, usageHint) trims whitespace; throws ContextError(idLabel, usageHint, []) for empty input, exactly one slash, or a trailing slash after a multi-segment target; returns a no-slash input as { id: trimmed, targetArg: undefined }; and splits inputs with 2+ slashes at the last / into { targetArg, id }.parseSlashSeparatedArg() intentionally skips validation for plain no-slash IDs because callers may perform further processing such as splitting newline-separated IDs; downstream validators such as validateHexId or validateTraceId provide format-specific validation. Extracted IDs from structured inputs are checked with validateResourceId(id, idLabel), while targetArg is validated separately through parseOrgProjectArg.parseIssueArg() splits input with LINE_SPLIT_PATTERN, trims each line, and uses the first non-blank line; if none remains, it throws ValidationError("Issue identifier is empty after trimming whitespace.", "issue identifier").parseIssueArg() fixes multiline input from command substitution, appended notes, or newline-separated IDs reaching validateResourceId and producing a cryptic “contains a newline” error (CLI-1G1, affecting 116+ users). Unlike sentry api, which rejoins wrapped URLs for CLI-FR, issue identifiers are atomic tokens, so joining lines would produce garbage.\n never breaks project display names with spaces (#1116), because control characters are rejected independently.parseIssueArg() first attempts Sentry URL detection via parseSentryUrl(input); recognized URLs apply context with applySentryUrlContext(urlParsed.baseUrl) and are converted through issueArgFromUrl(urlParsed). A recognized Sentry URL without an issue ID throws a ValidationError directing the user to https://sentry.io/organizations/{org}/issues/{id}/.parseIssueArg() checks magic @ selectors before other non-URL parsing and supports both bare @latest and organization-prefixed sentry/@latest.