Repository navigation
Open
Labels
Needs-Triage 🔍It's a new issue that core contributor team needs to triage.It's a new issue that core contributor team needs to triage.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!
### Environment
PSReadLine: 2.4.5
PowerShell: 7.6.9
OS: AlmaLinux 9.8 (Olive Jaguar)
BufferWidth: 235
BufferHeight: 71
Last 0 Keys:
### Exception
System.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_3685172568'. One or more system calls failed: lstat("/run/user/1001/.dotnet", ...) == -1; errno == EACCES;
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, NamedWaitHandleOptionsInternal options, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)Screenshot
[imagine a command line with pwsh as the only input]
Environment data
PS Version: 7.6.9
PS HostName: ConsoleHost
PSReadLine Version: 2.4.5
PSReadLine EditMode: Emacs
OS: Linux redacted 5.14.0-687.61.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 26 20:10:21 EDT 2026 x86_64 x86_64 x86_64 GNU/Linux
BufferWidth: 235
BufferHeight: 71Steps to reproduce
- login as any user (uid 1001 in this case)
- su to another user (uid 1004 in this case)
-> watch the error
Expected behavior
pwsh launches as expected
Actual behavior
XDG_RUNTIME_DIR=/run/user/1001 is still set, so the call goes out to stat a directory we don't have access to. This should be handled gracefully and not surface the exception
If you use "su - ", dropping the environment vars, everything works as expected
Metadata
Metadata
Assignees
Labels
Needs-Triage 🔍It's a new issue that core contributor team needs to triage.It's a new issue that core contributor team needs to triage.
Activity