首页 > 系统相关 >关于PowerShell -Verbose 改变 $ErrorActionPreference 的 Bug

关于PowerShell -Verbose 改变 $ErrorActionPreference 的 Bug

时间:2022-11-17 20:25:51浏览次数:58  
标签:verbose ErrorActionPreference PowerShell https Bug Verbose

问题

我们定义一个function,当我们尝试删除一个不存在的文件,但是不希望有错误出现
我们这么写,一切符合预期

但是,我们同时希望能记录删除操作的一些信息,我们加上-verbose通用参数,结果...

bug

https://github.com/PowerShell/PowerShell/issues/2247

Ref

https://stackoverflow.com/questions/37006493/why-does-verbose-disable-the-use-of-erroractionpreference

标签:verbose,ErrorActionPreference,PowerShell,https,Bug,Verbose
From: https://www.cnblogs.com/talentzemin/p/16900656.html

相关文章