Skip to content

vercel: env add multiline values get truncated when piped via stdin #4

@exisz

Description

@exisz

Source: vercel/vercel#14972
Pain
Piping a multiline secret (private keys, certs, JSON service-account files) to vercel env add truncates everything after the first \n. Common case: cat service-account.json | vercel env add GOOGLE_KEY production stores only the first line. Users discover this at runtime when auth fails.
Our solution
Detect multiline stdin in avercel env add and warn loudly BEFORE forwarding: ⚠️ avercel: stdin contains N newlines — vercel CLI will truncate. Using REST API instead.

Use the same REST API path as NEBULA-92 to upload the full multiline value (REST API accepts \n in value field correctly).

Add avercel env add NAME --file path/to/secret shorthand (reads file binary, sends via REST API). Mirrors the official documented vercel env add NAME env < file pattern but for non-interactive use.

DoD
[ ] Multiline detection in stdin

[ ] Auto-route multiline values to REST API

[ ] --file flag for explicit file upload

[ ] Test with: PEM private key, JSON service account, multiline cert chain


Migrated from NEBULA-93 | Parent: NEBULA-18 | Original status: To Do

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions