initial report on bad escaping
This commit is contained in:
parent
3545c9f2c1
commit
589abdeb5c
1 changed files with 64 additions and 0 deletions
64
doc/bugs/started_to_escape_characters_in_the_output.mdwn
Normal file
64
doc/bugs/started_to_escape_characters_in_the_output.mdwn
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
### Please describe the problem.
|
||||||
|
|
||||||
|
our datalad tests started to fail recently (in [this PR](https://github.com/datalad/datalad/pull/7372) is the effort to troubleshoot etc).
|
||||||
|
|
||||||
|
Here is what we see with recent version using such simple script:
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export PS4='> '
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd "$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)"
|
||||||
|
|
||||||
|
git init
|
||||||
|
git annex init
|
||||||
|
|
||||||
|
n='gl\orious'
|
||||||
|
# touch "$n"
|
||||||
|
git annex add --json --json-error-messages "$n"
|
||||||
|
```
|
||||||
|
|
||||||
|
that now
|
||||||
|
|
||||||
|
```
|
||||||
|
❯ ( source /home/yoh/git-annexes/10.20230407+git63-g3d1d77a1bb.env ; bash escaped.sh )
|
||||||
|
>> mktemp -d /home/yoh/.tmp/dl-XXXXXXX
|
||||||
|
> cd /home/yoh/.tmp/dl-OAXQ1CE
|
||||||
|
> git init
|
||||||
|
Initialized empty Git repository in /home/yoh/.tmp/dl-OAXQ1CE/.git/
|
||||||
|
> git annex init
|
||||||
|
init ok
|
||||||
|
(recording state in git...)
|
||||||
|
> n='gl\orious'
|
||||||
|
> git annex add --json --json-error-messages 'gl\orious'
|
||||||
|
git-annex: "gl\\orious" not found
|
||||||
|
add: 1 failed
|
||||||
|
```
|
||||||
|
|
||||||
|
so we get `\\` instead of `\` in the output printed by git-annex
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>previously was all fine</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
❯ ( source /home/yoh/git-annexes/10.20230407.env ; bash escaped.sh )
|
||||||
|
>> mktemp -d /home/yoh/.tmp/dl-XXXXXXX
|
||||||
|
> cd /home/yoh/.tmp/dl-1TzrWdi
|
||||||
|
> git init
|
||||||
|
Initialized empty Git repository in /home/yoh/.tmp/dl-1TzrWdi/.git/
|
||||||
|
> git annex init
|
||||||
|
init ok
|
||||||
|
(recording state in git...)
|
||||||
|
> n='gl\orious'
|
||||||
|
> git annex add --json --json-error-messages 'gl\orious'
|
||||||
|
git-annex: gl\orious not found
|
||||||
|
add: 1 failed
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
[[!meta author=yoh]]
|
||||||
|
[[!tag projects/datalad]]
|
Loading…
Reference in a new issue