-
Notifications
You must be signed in to change notification settings - Fork 3
Check args and flags for commands #117
Copy link
Copy link
Open
Description
Before executing the command, it may be necessary to check args and flags. If there are illegal arguments, an error should be returned directly.
Include but not limit to the following possible checks:
cat,sign,tee- if
srcis a dir,cat (sign, tee): src: Is a directoryshould return
- if
cpandmove- if
srcis a dir,--recursiveoption is required - if there are multiple srcs,
dstshould be a directory - if
src == dst,cp: 'src' and 'dst' are the sameerror should return (similarly,Dir(src) == dst) - if
dstis the subdirectory ofsrc, maybe we should reject?
- if
rm- if
srcis a dir,--recursiveoption is required
- if
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels