{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/1566","labels_url":"https://api.github.com/repos/systemd/systemd/issues/1566/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/1566/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/1566/events","html_url":"https://github.com/systemd/systemd/issues/1566","id":111473870,"number":1566,"title":"Provide hinting / debugging information for invalid escape sequence errors","user":{"login":"ianbytchek","id":1086845,"avatar_url":"https://avatars.githubusercontent.com/u/1086845?v=3","gravatar_id":"","url":"https://api.github.com/users/ianbytchek","html_url":"https://github.com/ianbytchek","followers_url":"https://api.github.com/users/ianbytchek/followers","following_url":"https://api.github.com/users/ianbytchek/following{/other_user}","gists_url":"https://api.github.com/users/ianbytchek/gists{/gist_id}","starred_url":"https://api.github.com/users/ianbytchek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianbytchek/subscriptions","organizations_url":"https://api.github.com/users/ianbytchek/orgs","repos_url":"https://api.github.com/users/ianbytchek/repos","events_url":"https://api.github.com/users/ianbytchek/events{/privacy}","received_events_url":"https://api.github.com/users/ianbytchek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/pid1","name":"pid1","color":"c7def8"},{"url":"https://api.github.com/repos/systemd/systemd/labels/RFE","name":"RFE","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-14T19:28:20Z","updated_at":"2015-11-17T08:26:15Z","closed_at":null,"body":"I filed a similar bug in fleet repository, but apparently this is to do with systemd, coreos/fleet#1373. See that for full details. In a nutshell, I get the following error. At random.\r\n\r\n```sh\r\n[/run/fleet/units/foo-discovery-node01@16e5d00.service:11] Invalid escape sequences in command line: \"/usr/bin/bash -c 'set -euo pipefail; container=\\'foo-%i\\'; directory=\\'/service/foo/\\'; while true; do port_check=false; curl_check=false; ip=\"$${COREOS_PRIVATE_IPV4}\"; key=$$(echo \\'%p\\' | pcregrep -o \\'\\w*$$\\')\\'-%i\\'; port=$$(docker inspect --format \\'{{ index .NetworkSettings.Ports \"80/tcp\" 0 \"HostPort\" }}\\' \"$${container}\") && :; [ $$? == 0 ] && port_check=true; if \"$${port_check}\"; then host=\"$${ip}:$${port}\"; curl --fail --max-time 1 --silent \"$${host}\" &> /dev/null && :; [ $$? == 0 ] && curl_check=true; fi; if \"$${curl_check}\"; then etcdctl set \"$${directory}/$${key}\" \"$${host}\" --ttl 20; echo \"Succesfully connected to foo container, adding service into discovery.\"; else etcdctl rm \"$${directory}/$${key}\" &> /dev/null && :; echo \"Failed connecting to foo container, removing service from discovery.\"; fi; sleep 10; done;'\"\r\n```\r\n\r\nThe script works as expected, this error occurred after it has been running for a while. The script itself comes from a separate file, it gets escaped and embedded into the unit file automatically when it gets deployed. I don't want to deploy a separate script to the host and then call it within unit file, this would make things more complicated for me eventually. But that's not really relevant.\r\n\r\nThe point is, it would be of huge help to see systemd giving a hint where the problem is, like most compilers do. Unless it's a simple command, the script is likely to be several hundred character long. Most of them require double or triple levels of escaping, making it impossible to follow."},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/157307209","html_url":"https://github.com/systemd/systemd/issues/1566#issuecomment-157307209","issue_url":"https://api.github.com/repos/systemd/systemd/issues/1566","id":157307209,"user":{"login":"goacid","id":4500450,"avatar_url":"https://avatars.githubusercontent.com/u/4500450?v=3","gravatar_id":"","url":"https://api.github.com/users/goacid","html_url":"https://github.com/goacid","followers_url":"https://api.github.com/users/goacid/followers","following_url":"https://api.github.com/users/goacid/following{/other_user}","gists_url":"https://api.github.com/users/goacid/gists{/gist_id}","starred_url":"https://api.github.com/users/goacid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goacid/subscriptions","organizations_url":"https://api.github.com/users/goacid/orgs","repos_url":"https://api.github.com/users/goacid/repos","events_url":"https://api.github.com/users/goacid/events{/privacy}","received_events_url":"https://api.github.com/users/goacid/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T08:26:15Z","updated_at":"2015-11-17T08:26:15Z","body":"+1\r\n"}}