Skip to content

sopstool add fails on files without extensions #11

@blimmer

Description

@blimmer

Current Behavior

root@e7210cdad8a8:/src# sopstool add secrets/some_file_without_ext
added file to list: secrets/some_file_without_ext
Error: open .sopssecrets/some_file_without_ext: no such file or directory
Usage:
  sopstool add [files ...] [flags]

Aliases:
  add, a

Flags:
  -h, --help         help for add
  -n, --no-encrypt   Do not encrypt the file after adding

Global Flags:
      --configpath string   config file path (default ".")

open .sopssecrets/some_file_without_ext: no such file or directory

it also doesn't work with a . in the path:

root@e7210cdad8a8:/src# sopstool add ./secrets/some_file_without_ext
added file to list: ./secrets/some_file_without_ext
Error: open .sops./secrets/some_file_without_ext: no such file or directory
Usage:
  sopstool add [files ...] [flags]

Aliases:
  add, a

Flags:
  -h, --help         help for add
  -n, --no-encrypt   Do not encrypt the file after adding

Global Flags:
      --configpath string   config file path (default ".")

open .sops./secrets/some_file_without_ext: no such file or directory

Expected Behavior

I expected this to add the file to my .sops.yaml and encrypt the file.

Steps to reproduce

Try to sopstool add any file without an extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions