key-value-stores set-value stores an empty record when the value comes from stdin (CLI 1.10.0, Windows) · Issue #1474 · apify/apify-cli · GitHub
Skip to content

key-value-stores set-value stores an empty record when the value comes from stdin (CLI 1.10.0, Windows) #1474

Open

Description

@yappmaniac

CLI 1.10.0: key-value-stores set-value stores an empty record when the value comes from stdin. With apify-cli 1.10.0 (d227b1f), installed via npm on Windows x64 with Node 24.19.0, apify key-value-stores set-value writes a record of size 0 whenever the value is piped in on stdin, even from a plain shell pipe. The same value passed as an argument is stored correctly.

To reproduce (Git Bash, any key-value store you own):

echo '{"a":1}' | apify key-value-stores set-value stdin-test --content-type application/json
apify key-value-stores keys --json lists stdin-test with "size": 0, and apify key-value-stores get-value stdin-test prints only the content-type line and no value.
apify key-value-stores set-value arg-test '{"a":1}' --content-type application/json stores 7 bytes, and get-value returns {"a":1}.

We expected step 1 to store the piped bytes, as apify datasets push-items does with a JSON array on stdin. The workaround of passing the value as an argument is capped by the Windows command-line length, so values over about 32 KB can't be written with the CLI at all.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-buildersIssues owned by the Builders team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions