You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bug] --norc under --login -i: honored by niu, ignored by bash for the rc half (+2 related startup gaps)
# same fakehome files as #1159
bash --norc --login -i -c 'echo AFTER'# still prints BASH-RC (+PROFILE-RAN)
niu --norc --login -i -c 'echo AFTER'# PROFILE-RAN only
Low (flag interaction; likely same root cause as #1159, but the flag interaction itself observably differs — either order of --norc/--login).
Two more startup gaps, same batch:
--rcfile <dir> / --init-file <dir>: bash warns ...: is a directory then runs; niu silent, runs. (Distinct from [bug] No diagnostic when BASH_ENV names a directory #1146, which covers BASH_ENV-is-directory — verified niu DOES diagnose there, modulo trivial Is vs is casing.)
Profile-chain fallthrough on directory ~/.bash_profile (with ~/.profile present): bash errors ...: is a directory and STOPS (.profile NOT read); niu silently skips to .profile and runs it. Different files get executed — medium.
Unreadable ~/.bash_profile (chmod 000): bash Permission denied; niu No such file or directory (wrong errno string, rc=0 both, no fallthrough either side).
Env: niubash 1.4.4 / rubash engine (master ~2026-10), GNU bash 5.3.20 aarch64-linux-android as oracle.
Triage vs current master (e743db8, release build) + WSL GNU 5.3.20, per sub-item:
--norc under --login -i — premise correction: stock GNU does NOT source ~/.bashrc under login shells at all (verified: env HOME=fakehome bash --login -i -c → profile chain only, no rc marker; same for --norc --login -i). The BASH-RC print on the filing machine came from its .bash_profile sourcing .bashrc. Nothing diverges here.
dir .bash_profile fallthrough — the profile chain is #[cfg(not(windows))]-gated in rubash.exe, so not exercisable here; login_profile_files() includes the dir candidate and run_init_file now reports the real error (same 24d153b path), which is the GNU shape (error + no fallthrough). Marking verified-by-code-path, not by run.
chmod-000 errno — same code path as (3); real-error reporting covers it.
Fixed by #1181; residual platform-errno difference noted in item 2. Closing.
Activity
caomengxuan666 commentedon Oct 23, 2026
Triage vs current master (e743db8, release build) + WSL GNU 5.3.20, per sub-item:
--norcunder--login -i— premise correction: stock GNU does NOT source~/.bashrcunder login shells at all (verified:env HOME=fakehome bash --login -i -c→ profile chain only, no rc marker; same for--norc --login -i). The BASH-RC print on the filing machine came from its.bash_profilesourcing.bashrc. Nothing diverges here.--rcfile <dir>— FIXED by Bulk fix: 112 GNU bash 5.3 compatibility issues from the 2026-10-22/23 differential audit #1181 (commit 24d153b, real-error reporting): rubash now diagnoses instead of staying silent. Windows residual:rubash: D:\\tmp\\fakehome: Permission deniedvs GNUbash: FILE: is a directory— the Windows open genuinely returns EACCES, so this is platform-errno shape, not a missed fix..bash_profilefallthrough — the profile chain is#[cfg(not(windows))]-gated in rubash.exe, so not exercisable here;login_profile_files()includes the dir candidate andrun_init_filenow reports the real error (same 24d153b path), which is the GNU shape (error + no fallthrough). Marking verified-by-code-path, not by run.Fixed by #1181; residual platform-errno difference noted in item 2. Closing.
caomengxuan666 commentedon Oct 23, 2026
Retest on niu 1.4.4 / rubash 1b14a3d vs GNU bash 5.3.20:
Permission denied— all match.--norc --login -istill diverges, same root as [bug] Login+interactive shells skip the rc file #1159 (login chain reads profile but not rc). Since [bug] Login+interactive shells skip the rc file #1159 was closed NOT-A-BUG (no login concept on Windows; fix(startup): read ~/.bashrc then ~/.niubashrc for interactive non-login shells (#1158) #1187), this residual falls under the same ruling.Leaving closed; ignoring the residual per the #1159 ruling.