System.IO.IOException on MacOS pwsh
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
Piste de recherche
Start at PSConsoleReadLine.DelayedOneTimeInitialize() in the stack trace and trace how the history file name is used to create the mutex, especially when pwsh runs under sudo on macOS. Reproduce with the listed command and compare behavior with a normal shell session. Done means the exception no longer prevents PSReadLine from working in the reported setup.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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.8
OS: macOS 26.7.1
BufferWidth: 80
BufferHeight: 24
Last 0 Keys:
### Exception
System.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_3549844812'. One or more system calls failed: lstat("", ...) == -1; errno == ENOENT;
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
Environment data
PS Version: 7.6.8
PS HostName: ConsoleHost
PSReadLine Version:
PSReadLine EditMode: Emacs
OS: Darwin dm-XXXXX 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:53 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6030 arm64
BufferWidth: 114
BufferHeight: 59
Steps to reproduce
run "sudo pwsh" in the terminal
Expected behavior
No exception
Actual behavior
Exception, PSReadLine does not work, has to be removed with "Remove-Module PSReadLine" to be able to use pwsh
- Langage dominant
- C#
- Étoiles
- 4.4k
- Forks
- 345
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PowerShell/PSReadLine
-
Get-PSReadLineOption emits the ListView window-size warning, so prompt modules trigger it on every shell startPeut-être pris @thc1006 l’a pris il y a 55 jours. OuverteNeeds-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
PowerShell/PSReadLine#3470 · 3 réactions ·
Toutes les issues de PowerShell/PSReadLine
Issues similaires
-
fix(testing): HeadlessTerminal disposes services synchronouslyPeut-être pris @zidad l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 69/100
RazorConsole/RazorConsole#388 ·
Les mainteneurs répondent en général sous 1 jour
-
A practical example of rulerOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
starlinghq/starling#209 ·
Les mainteneurs répondent en général sous 1 jour
-
affected/v17 area/frontend type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
umbraco/Umbraco-CMS#24323 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
dotnet/roslynator#1859 ·
Les mainteneurs répondent en général sous 1 jour