Closed fmaximus closed 9 months ago
op-js version: 0.1.9
CLI version: 2.19.0
OS: Windows
CLI returns error 'Failed to create item: invalid JSON'.
Item created successfully
Call item.create().
Since 2.6.2, CLI supports passing fields via arguments rather than JSON piped input. Seems not passing input fails.
Changing stdio option passed to child_process.spawnSync from "pipe" to ["ignore", "pipe", "pipe"] solves the issue.
Causes https://github.com/1Password/op-vscode/issues/100
I seem to be having this issue with the VS Code 1Password extension.
Your environment
op-js version: 0.1.9
CLI version: 2.19.0
OS: Windows
What happened?
CLI returns error 'Failed to create item: invalid JSON'.
What did you expect to happen?
Item created successfully
Steps to reproduce
Call item.create().
Notes & Logs
Since 2.6.2, CLI supports passing fields via arguments rather than JSON piped input. Seems not passing input fails.
Changing stdio option passed to child_process.spawnSync from "pipe" to ["ignore", "pipe", "pipe"] solves the issue.