mksh R50c: parser fixes break common “set -u” workaround
Bug #1378208 reported by
Thorsten Glaser
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mksh |
Fix Released
|
Critical
|
Thorsten Glaser |
Bug Description
tglase@tglase:~ $ MODULESDIR=
tglase@tglase:~ $ dir=kernel/
tglase@tglase:~ $ exclude=
tglase@tglase:~ $ kmods=$(find "${MODULESDIR}
tglase@tglase:~ $ kmods=$(find "${MODULESDIR}
find: cannot search `': No such file or directory
${exclude:-} now generates a field where it previously didn’t.
Changed in mksh: | |
assignee: | nobody → Thorsten Glaser (mirabilos) |
importance: | Undecided → Critical |
status: | New → Confirmed |
Changed in mksh: | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
Cause: https:/ /github. com/MirBSD/ mksh/commit/ 968dc7a764b1bd6 a39411caaab5403 6513c264f0 eval.c changes (1.151 → 1.152)
Possibly this:
tglase@tglase:~ $ showargs() { for i; do echo -n " <$i>"; done; echo; }
tglase@tglase:~ $ IFS=:; showargs 1 ${-+:foo:bar}
<1> <> <foo> <bar>
tglase@tglase:~ $ IFS=' '; showargs 1 ${-+ foo bar}
<1> <> <foo> <bar>
tglase@tglase:~ $ ksh93
ksh93$ showargs() { for i; do echo -n " <$i>"; done; echo; }
ksh93$ IFS=:; showargs 1 ${-+:foo:bar}
<1> <> <foo> <bar>
ksh93$ IFS=' '; showargs 1 ${-+ foo bar}
<1> <foo> <bar>
ksh93$
tglase@tglase:~ $ bash
bash$ showargs() { for i; do echo -n " <$i>"; done; echo; }
bash$ IFS=:; showargs 1 ${-+:foo:bar}
<1> <> <foo> <bar>
bash$ IFS=' '; showargs 1 ${-+ foo bar}
<1> <foo> <bar>
Only IFS_NWS should generate a field.