shyim / idea-1password

Integrate 1Password into Intellij based IDEs
Apache License 2.0
23 stars 5 forks source link

Generating Preview Failed #8

Open izotomas opened 1 year ago

izotomas commented 1 year ago

When i try to generate preview for some file, i get following error:

Generating preview failed: [ERROR] 2023/05/31 15:34:31 expected data on stdin but none found

I believe the error could be here:

https://github.com/shyim/idea-1password/blob/8869daa572982af89b0dc941066f8f6bc2f66f1b/src/main/kotlin/de/shyim/idea1password/OPManager.kt#L15

It seems like the command builder misses an extra file input argument, i.e.

val commandLine = GeneralCommandLine("op", "inject", "--in-file") // actual file passed later

I don't really know kotlin but according to 1password cli v2.18 inspect command requires -i/--in-file flag prior to the file, e.g.

op inject --in-file {FILE}