Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception error after usage sudo command #3504

Closed
3 tasks done
mitek-mb opened this issue Dec 2, 2022 · 1 comment
Closed
3 tasks done

exception error after usage sudo command #3504

mitek-mb opened this issue Dec 2, 2022 · 1 comment

Comments

@mitek-mb
Copy link

mitek-mb commented Dec 2, 2022

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.2.6
PowerShell: 7.3.0
OS: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64
BufferWidth: 190
BufferHeight: 34

Last 0 Keys:



### Exception

System.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_91202998'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, 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

pwsh-error-psreadline

Environment data

PS Version: 7.3.0
PS HostName: ConsoleHost
PSReadLine Version: 2.2.6
PSReadLine EditMode: Emacs
OS: Darwin MacBookPro 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64
BufferWidth: 120
BufferHeight: 30

Steps to reproduce

  1. start 'sudo pwsh'
  2. Install-Module -Name PSWSMan
  3. Install-WSMan
  4. (it will drop back to bash)
  5. start 'pwsh'
  6. error is shown.
  7. type 'exit'
  8. start 'pwsh'
  9. error is shown again

A normal pwsh is only possible again after initiating a new terminal shell

Expected behavior

no exception error after restarting pwsh

Actual behavior

every command shows an exception error as mentioned above

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Dec 2, 2022
@daxian-dbw
Copy link
Member

daxian-dbw commented Dec 2, 2022

Thanks for reporting this issue. It's a duplicate of #2658

@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants