Open ezpzbz opened 5 years ago
@sphuber @giovannipizzi I think here the question is whether we want to put in place some automatic cleaning rule for assigning labels in general (e.g. using something like this to strip out any control character)
It could be indeed useful. Also stripping spaces (at beginning and end of line) could be a sensible thing to do I guess. PR welcome! ;-)
I found that if by some reason there would be a tab (for example) in the code name, then it will be recorded as \t in the DB, afterward, the code will not be recognized by the name.
For instance: The following code was configured on my system:
$ verdi code list
List of configured codes:
(use 'verdi code show CODEID' to see the details)
PK 29 UUID 7afbd1ba-87c3-4d23-841f-c251a2206985 Label raspa5 Description DEBUG Default plugin raspa Type remote Remote machine ovan Remote absolute path /home/pezhman/.local/software/raspa_2.0.37/bin/simulate Prepend text export RASPA_DIR=/home/pezhman/.local/software/raspa_2.0.37 Append text No append text
Then, when I tried to use it in calculation I got:
$ verdi run test_raspa_base.py raspa5 The code 'raspa5' does not exist
Within the verdi shell, I see the code label as: '\traspa5'