Skip to content

Add support for Windows in secrets edit command #341

@aryanjassal

Description

@aryanjassal

Specification

The secrets edit command has never had a Windows implementation. As such, this command is currently defunct for Windows. This is a major usability issue and this must be addressed before multiplatform tests can be added onto the CI.

Windows - VISUAL, EDITOR, get the .txt file association first, then default to notepad.exe and wait for it to finish. Windows never had a default terminal text editor.

If the defaults cannot be found, you need to error out, indicating that no default editor could be found, and users can instead choose to set VISUAL, EDITOR or pass in the "editor" program with --ed or something.

Furthermore it is important that the temporary being created can only be edited by the same user as the user who ran polykey secrets edit, otherwise it can be intercepted. The file should have a limited umask, like 700 equivalent for Windows.

Additional context

Tasks

  1. Implement secrets edit for Windows
  2. Make sure all the secrets edit tests are passing on Windows

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions