Skip to content

--output-type must appear before -d #1259

@spencerwilson

Description

@spencerwilson

On sops 3.7.3:

Expected

Given an encrypted .env file,

% sops -d secrets.enc.env --output-type json
<command prints secrets in the env file, but in a JSON object container instead>

Actual

% sops -d secrets.enc.env --output-type json
<command behaves as though `--output-type` was not given

Workaround

Moving --output-type json in front of -d <path> does work:

% sops --output-type json -d secrets.enc.env
<expected output as described above>

Not sure if this is expected behavior and thus a docs gap, or a bug. I'd guess the latter since sops --help says that everything is just a "global option" with no relative order required for them to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions