lukesampson / pshazz

Give your powershell some pizazz.
The Unlicense
581 stars 40 forks source link

Cannot write to function prompt #100

Open Ash258 opened 5 years ago

Ash258 commented 5 years ago

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 commented 5 years ago

Fancy seeing you here! :smile: 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: https://github.com/cmderdev/cmder/issues/1207#issuecomment-273478981