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

Cannot write to function prompt #100

Open
Ash258 opened this issue May 27, 2019 · 1 comment
Open

Cannot write to function prompt #100

Ash258 opened this issue May 27, 2019 · 1 comment

Comments

@Ash258
Copy link

Ash258 commented May 27, 2019

Cmder
Administrator Powershell 5.1.17763.503

pshazz: 0.2019.05.24 -> 0.2019.05.25
Updating one outdated app:
Updating 'pshazz' (0.2019.05.24 -> 0.2019.05.25)
Downloading new version
b9e7625a50eaf0d39647d6d8efdcc8a39d32d6a9.zip (53.0 KB) [============================================================================================================================================================================] 100%
Checking hash of b9e7625a50eaf0d39647d6d8efdcc8a39d32d6a9.zip ... ok.
Uninstalling 'pshazz' (0.2019.05.24)
Removing shim for 'pshazz'.
Unlinking C:\SCOOP\\apps\pshazz\current
Installing 'pshazz' (0.2019.05.25) [64bit]
Loading b9e7625a50eaf0d39647d6d8efdcc8a39d32d6a9.zip from cache
Extracting b9e7625a50eaf0d39647d6d8efdcc8a39d32d6a9.zip ... done.
It looks like pshazz is already in your powershell profile, skipping.

           _                   _
 _ __  ___| |__   __ _ _______| |
| '_ \/ __| '_ \ / _` |_  /_  / |
| |_) \__ \ | | | (_| |/ / / /|_|
| .__/|___/_| |_|\__,_/___/___(_)
|_|

Cannot write to function prompt because it is read-only or constant.
At C:\SCOOP\apps\pshazz\0.2019.05.25\lib\prompt.ps1:112 char:1
+ function global:prompt {
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (prompt:String) [], SessionStateUnauthorizedAccessException
    + FullyQualifiedErrorId : FunctionNotWritable
@netcrns
Copy link

netcrns commented Aug 5, 2019

Fancy seeing you here! 😄
Comment out (or remove) the -Options ReadOnly from Set-Item -Path function:\prompt -Value $Prompt -Options ReadOnly in the last line of %CMDER_ROOT%\vendor\profile.ps1.
Found this workaround here: cmderdev/cmder#1207 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants