Open tegefaulkes opened 3 weeks ago
Specifying existing vaultname should... - How do we want to handle this? We want to treat it as the root directory so we have 3 options. Don't allow it at all with a
isRootDir
error or something, Allow it but special case to delete the vault if empty of recursive set. Or allow but special case to just delete all root contents.
The VaultOps.deleteSecret
throws an error with code EINVAL
for invalid operations, such as attempt to remove the vault root directory. For now, I am handling this error as if handling removal of a write-protected directory. It would throw something like this: rm: cannot remove '/': Permission denied
.
This probably needs a review later on, but I think is a sufficient solution for the time being, and also perfectly aligns with how Unix commands work.
Specification
I've been going over the new secrets commands to see if they function as expected. I'll be outlining problems I find here. I'm not considering any localpath to vault crossover for now.
General questions
rm: cannot remove 'nodir': No such file or directory
. However what if the error is a missing vault? Should we format that better than we are right now? Keep it more inline with the fs style error formatting?../
in paths that point outside of the root tree for the vault. Writing treats it as in the root directory. But ls will append the../
paths to the file names. The ls behaviour needs to be changed but is the write behaviour allowed?write
expectations
ErrorVaultsVaultUndefined
error. Before providing input.../
paths. - Works but treats it as the root directory. Do we allow this or explicitly not allow the path?rm
isRootDir
error or something, Allow it but special case to delete the vault if empty of recursive set. Or allow but special case to just delete all root contents.ErrorVaultsVaultUndefined
error. - Right now it's giving a EPERM cannot remove vault root error message. (addressed in Polykey#838)edit
TypeError: The "path" argument must be of type string. Received undefined
(addressed in Polykey#838)TypeError: The "path" argument must be of type string. Received undefined
(addressed in Polykey#838)undefined
.cat
ls
I'm not sure we added multiple path support to ls yet.
This still needs work to support multiple paths.
mkdir
Be sure to add onto the lists if you think of any checks to do.
Additional context
Tasks