Function: sops--popup-error
sops--popup-error is a natively compiled function defined in sops.el.
Signature
(sops--popup-error FILE ARGS EXIT-STATUS STDERR)
Documentation
Pop up *sops-error: FILE* with details of a sops invocation failure.
ARGS is the list passed to sops, EXIT-STATUS the exit code (integer), STDERR the captured stderr (string; pass "" if absent). Returns the displayed buffer.
Source Code
;; Defined in /nix/store/vihl6lkzddv9xrsrsznvqdjq27g2i30p-emacs-packages-deps/share/emacs/site-lisp/elpa/sops-20260920.2121/sops.el
(defun sops--popup-error (file args exit-status stderr)
"Pop up *sops-error: FILE* with details of a sops invocation failure.
ARGS is the list passed to sops, EXIT-STATUS the exit code (integer),
STDERR the captured stderr (string; pass \"\" if absent). Returns the
displayed buffer."
(let* ((buf-name (format "*sops-error: %s*" file))
(buf (get-buffer-create buf-name)))
(with-current-buffer buf
(let ((inhibit-read-only t))
(erase-buffer)
(insert (format "sops %s\n" (mapconcat #'identity args " "))
(format "Exit status: %d\n" exit-status)
(format "Time: %s\n" (format-time-string "%FT%T%z"))
"─── stderr ───\n"
stderr
"\n─── recovery ───\n"
"Fix the issue above (e.g., re-auth, plug in yubikey,"
" set AWS_PROFILE), then in the original buffer:\n"
" C-x C-s retry save (encrypt errors)\n"
" M-x revert-buffer retry decrypt (decrypt errors)\n"))
(set-buffer-modified-p nil)
(read-only-mode 1)
(local-set-key (kbd "q") #'quit-window))
(display-buffer buf)
buf))