Forum Discussion

Former Member's avatar
Former Member
4 years ago

CLI V2 returns `-- fields` surrounded in double quotes, V1 didn’t

There is a pretty big breaking change in the CLI V2.
It now returns fields wrapped in double quotes.
Is this intended behavior? Any simple suggestion for getting it back to returning without those quotes?

Here’s a pretty minimally reproducible example:
echo '{ "title": ".env.local2", "category": "SECURE_NOTE", "fields": [ { "id": "notesPlain", "type": "STRING", "purpose": "NOTES", "label": "notesPlain", "value": "NEXT_PUBLIC_ENV=\"DEV\"" } ] }' > template.json

op item create --template template.json
ID: nfuwzcobqgc4gq764nqefk6g2q
Title: .env.local2
Created: now
Updated: now
Favorite: false
Version: 0
Category: SECURE_NOTE
Fields:
notesPlain: NEXT_PUBLIC_ENV="DEV"

op item get .env.local2 --fields notesPlain
"NEXT_PUBLIC_ENV=""DEV"""
op1 get item .env.local2 --fields notesPlain
NEXT_PUBLIC_ENV="DEV"


1Password Version: 2.0.0
Extension Version: Not Provided
OS Version: macOS 12.3

11 Replies