我試圖弄清楚為什么我不斷收到此錯誤
不是“名稱=值”格式
有沒有辦法讓 VSCode 在其終端中運行命令時關閉截斷?b/c 我正在尋找的那部分資料正是被切斷的!
d5a2dd24f79c56d88e4e20b6c8a... My Pictures/Kaelyn/Automatic Upload/iPhone/2020-11-05 10-03-02.904.jpeg
ConvertFrom-StringData : Data line ' ERROR My Pictures/Kaelyn/Automatic Upload/iPhone/2020-11-05 10-03-02.703.jpeg' is not in 'name=value' format.
At line:1 char:54
... efiles -replace '^[a-f0-9]{32}( )', '$0= ' | ConvertFrom-StringData
~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
uj5u.com熱心網友回復:
您要設定的是$FormatEnumerationLimit首選項變數。
設定$FormatEnumerationLimit = -1為在 PowerShell 中禁用輸出截斷。默認情況下,這設定為4。這個數字代表給定屬性在截斷輸出之前默認列舉的物件數量,我們可以看到堆疊跟蹤的第一行在該行倒數第 5 個單詞的中間被截斷。
對于您的具體情況,您也可以通過選擇$Error[0]. $Error 是一個自動變數陣列,其中包含有關當前 PowerShell 會話中發生的例外的資訊。最近的例外將是第一個 ( 0) 索引,索引的每次增量都表示按發生順序排列的前一個錯誤。
具體來說,$Error[0].Exception應該給你你正在尋找的資訊。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/339026.html
