getsops / getsops/sops

Improve error message when trying to load non-SOPS binary files

Open
#258 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority/low
Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

Currently a message like this is shown:

Error loading file metadata: Error unmarshalling input json: invalid character '#' looking for beginning of value

Hinting at the user that this might be caused by the file not actually being a SOPS file would be useful.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the file-loading path that emits “Error loading file metadata” and the JSON unmarshalling error. Reproduce the problem with a non-SOPS binary and update the resulting message so it suggests the file may not be a SOPS file; done when that case provides the additional guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.