1Password / op-js

A JS library powered by the 1Password CLI
https://developer.1password.com/docs/cli
MIT License
91 stars 8 forks source link

Failed to read `/dev/stdin` in environment without STDIN #191

Open chrisvander opened 2 months ago

chrisvander commented 2 months ago

Your environment

op-js version: 0.1.11

CLI version: N/A

OS: Docker image node:18

What happened?

Error occurs when starting the app: [CLIError]: could not read the input file /dev/stdin: open /dev/stdin: no such device or address

I am passing the OP_SERVICE_ACCOUNT_TOKEN, so it should authenticate with that and not attempt to use stdin.

What did you expect to happen?

Succeed on run and use the environment variables to authenticate.

Steps to reproduce

  1. Use op-js inside of a Node.js Docker container without stdin active
  2. Call inject.data

Notes & Logs

jodyheavener commented 2 months ago

Hey @chrisvander thanks for filing this issue! Apologies for the delay. I think I understand what's happening, but I want to ensure I am correctly reproducing your experience. Would you be able to create a minimum reproducible example that I can use for this?