Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-2745

mender-artifact cp misbehaves when stdin and two arguments are passed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              oleorhagen Ole Petter Orhagen
              Reporter:
              lluis Lluís Campos
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel