mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-14 12:11:27 +08:00
test: skip chmod-based permission tests when running as root (#2171)
Two tests provoke EACCES via chmod (saveAliases backup double failure, appendSessionContent on a read-only file) and already skip on win32, but root ignores file modes so both fail when the suite runs as root (for example in a default Docker container). Every other chmod-based test in the repo already guards with process.getuid?.() === 0; these two were the only ones missing the guard. Apply the same skip condition and message.
This commit is contained in:
committed by
GitHub
parent
b189e8ec9f
commit
6614f79fe3
@@ -1230,8 +1230,8 @@ function runTests() {
|
||||
// session-aliases.js lines 131-137: When saveAliases fails (outer catch),
|
||||
// it tries to restore from backup. If the restore ALSO fails, the inner
|
||||
// catch at line 135 logs restoreErr. No existing test creates this double-fault.
|
||||
if (process.platform === 'win32') {
|
||||
console.log(' (skipped — chmod not reliable on Windows)');
|
||||
if (process.platform === 'win32' || process.getuid?.() === 0) {
|
||||
console.log(' (skipped — chmod ineffective on Windows/root)');
|
||||
return;
|
||||
}
|
||||
const isoHome = path.join(os.tmpdir(), `ecc-r90-restore-fail-${Date.now()}`);
|
||||
|
||||
Reference in New Issue
Block a user