mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Call clearstatcache() after changing ~/.arcrc permissions
Summary: Otherwise we'll get a cached result from fileperms() if we end up here again. Test Plan: `chmod 644 ~/.arcrc ; arc help` no longer double prompts when run from outside of a .arcconfig working copy. Reviewers: csilvers Reviewed By: csilvers CC: aran Maniphest Tasks: T1359 Differential Revision: https://secure.phabricator.com/D2752
This commit is contained in:
parent
22ad85dad7
commit
4448bd09c7
1 changed files with 5 additions and 0 deletions
|
@ -991,6 +991,11 @@ abstract class ArcanistBaseWorkflow {
|
|||
throw new ArcanistUsageException("Set ~/.arcrc to file mode 600.");
|
||||
}
|
||||
execx('chmod 600 %s', $user_config_path);
|
||||
|
||||
// Drop the stat cache so we don't read the old permissions if
|
||||
// we end up here again. If we don't do this, we may prompt the user
|
||||
// to fix permissions multiple times.
|
||||
clearstatcache();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue