Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 'output: unbound variable' while executing 'doctoc.sh' #2455

Open
jlegido opened this issue May 7, 2021 · 2 comments
Open

Error 'output: unbound variable' while executing 'doctoc.sh' #2455

jlegido opened this issue May 7, 2021 · 2 comments

Comments

@jlegido
Copy link

jlegido commented May 7, 2021

First of all many thanks to all the people involved on this project for their time, I really appreciate it.

Steps to reproduce

  1. Clone the git project
git clone https://github.com/dedis/cothority
  1. 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
Copy link
Member

ineiti commented May 10, 2021

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?

@keducoop
Copy link
Contributor

Done, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants