https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268156
Bug ID: 268156
Summary: /bin/sh: errors are printed with wrong line numbers in
strict mode (set -euo pipefail)
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
This script:
> #!/bin/sh
>
> set -euo pipefail # strict mode
>
> echo "$1"
fails with:
> ./x.sh: 1: parameter not set
The actual error is in line 5, not line 1.
As a comparison, bash prints a correct line number:
> ./x.sh: line 5: $1: unbound variable
Bash error message is also more relevant.
--
You are receiving this mail because:
You are the assignee for the bug.