Skip to content

failed to parse command from stdin: line 0, column 0, position 0: failed to read PDU size #1336

@papanito

Description

@papanito

The following command fails

 watchman -j wm_trigger_sync_movies.json
failed to parse command from stdin: line 0, column 0, position 0: failed to read PDU size

While content of the file is

[
  "trigger",
  "/home/papanito/Videos/Movies/",
  {
    "name": "movies-sync",
    "expression": [
      "anyof",
      [
        "match",
        "*.mkv",
        "wholename"
      ],
      [
        "match",
        "*.avi",
        "wholename"
      ],
      [
        "match",
        "*.mp4",
        "wholename"
      ],
      [
        "match",
        "*.srt",
        "wholename"
      ]
    ],
    "command": [
      "rsync",
      "/home/papanito/Videos/Movies/",
      "10.0.0.10:/media/media/",
      "-rv",
      "--update",
      "--ignore-existing",
      "-e",
      "ssh -i /home/papanito/.ssh/id_my_key -o BatchMode=yes -o StrictHostKeyChecking=accept-new"
    ],
    "append_files": true
  }
]

I can add it like this

watchman -- trigger /home/papanito/Videos/Movies movies-sync "*.avi" -- rsync ~/Videos/Movies/ 10.0.0.10:/media/media/ -rv --update --ignore-existing -e 'ssh -i /home/papanito/.ssh/id_paperless_sync -o Batode=yes -o StrictHostKeyChecking=accept-new'

What's wrong with my json file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions