Unbound variable $1
Hologos opened this issue · comments
Jiří Málek commented
Hi,
I am running script with set -euo pipefail
and the library produces unbound variable
error and stops the script.
#! /usr/bin/env bash
set -euo pipefail
. vendor/fidian/ansi/ansi
echo "this line gets printed"
fmt_bold="$(ansi --bold --no-restore)"
echo "this one does not"
ansi --underline --no-restore
echo "neither this one"
$ ./ansi-test.sh
this line gets printed
vendor/fidian/ansi/ansi: line 868: $1: unbound variable
Tyler Akins commented
You're absolutely right, and I thank you for reporting this error in my code!