Error 'output: unbound variable' while executing 'doctoc.sh'
jlegido opened this issue · 2 comments
jlegido commented
First of all many thanks to all the people involved on this project for their time, I really appreciate it.
Steps to reproduce
- Clone the git project
git clone https://github.com/dedis/cothority
- Execute
doctoc.sh
:
bash cothority/doctoc.sh cothority/README.md
Expected behaviour
Get an output similar to:
Created doctoc.sh block in cothority/README.md succesfully
Found behaviour
The output is:
cothority/doctoc.sh: line 96: output: unbound variable
Error message
cothority/doctoc.sh: line 96: output: unbound variable
Workaround
If we comment out the set -u
line:
sed -i 's/set -u/#set -u/g' cothority/doctoc.sh
The script works.
ineiti commented
thanks for catching that. I think a better fix would be to add a
output=""
before the while loop on line 86 of the doctoc.sh script. Can you test that and create a PR, please?