Details
-
Type:
Bug
-
Status: Done
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:
-
Sprint:MEN Sprint 94
-
Backlog:yes
-
Days in progress:1
Description
mender-artifact cp command is design to imitate the Linux standard tools with regards to how to treat arguments and stdin.
For the following command:
cat otherfile | mender-artifact cp myfile myartifact:/home/myfile
- Current behavior: takes otherfile from stdin and try to copy it into myfile, failing due to myfile not being a Mender Artifact nor a SD image.
- Expected behavior: ignores stdin, executes cp from myfile into myartifact.
Acceptance criteria:
- The cp command behaves like the Linux standard tools: first check the arguments, if you don't have enough then check stdin.
- Optionally: use "-" argument to specify the use of stdin in the cp command. Without this argument, stdin should always be ignored.
Edit:
Acceptance criteria:
- The cp command explicilty requires '-' in order to read from stdin. This is preferred over the regular gnu-tools functionality because it keeps black magic at bay. This means that two command line arguments are always required.