Powershell: Get-Date -UFormat ''๋Š” ๋นˆ ๋ฌธ์ž์—ด ์ธ์ˆ˜์— ๋Œ€ํ•ด ๋„์›€์ด ๋˜์ง€ ์•Š๋Š” ์˜ˆ์™ธ๋ฅผ throwํ•ฉ๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2017๋…„ 10์›” 07์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: PowerShell/PowerShell

Get-Date -UFormat '' IndexOutOfRangeException $#$ ๋ฅผ throwํ•ฉ๋‹ˆ๋‹ค. ์˜ค๋ฅ˜๊ฐ€ ๋ฌด์—‡์ด ์ž˜๋ชป๋˜์—ˆ๋Š”์ง€ ๋งํ•˜๊ณ  UFormat ์ธ์ˆ˜์— ์ฃผ์˜๋ฅผ ๊ธฐ์šธ์ด๋ฉด ๋” ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค. "๋ˆ„๋ฝ๋˜๊ฑฐ๋‚˜ ์ž˜๋ชป๋œ UFormat ๋ฌธ์ž์—ด" ๋˜๋Š” ๊ทธ ํšจ๊ณผ์— ๋Œ€ํ•œ ๋‹จ์–ด.

์žฌํ˜„ ๋‹จ๊ณ„

PS /test> get-date -uformat "$accidentallyEmptyFormatStringVariable"
get-date : Index was outside the bounds of the array.
At line:1 char:1
+ get-date -uformat ''
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Date], IndexOutOfRangeException
    + FullyQualifiedErrorId : System.IndexOutOfRangeException,Microsoft.PowerShell.Commands.GetDateCommand

์˜ˆ์ƒ๋˜๋Š” ํ–‰๋™

A message directing attention to the -UFormat string parameter being empty.

์‹ค์ œ ํ–‰๋™

A message about some internal problem.

ํ™˜๊ฒฝ ๋ฐ์ดํ„ฐ

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta.8
PSEdition                      Core
GitCommitId                    v6.0.0-beta.8
OS                             Linux 2.6.32-042stab120.6 #1 SMP Thu Oct 27 16:59:03 MSK 2016
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Area-Cmdlets-Utility Hacktoberfest Resolution-Fixed Up-for-Grabs

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  3 ๋Œ“๊ธ€

๋™์˜ํ•ฉ๋‹ˆ๋‹ค. ๋ชจ๋“  ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์กฐ์น˜ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค(๋˜๋Š” ๊ฐ€๋Šฅํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ์ •๋ณด ์ œ๊ณต).

์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@DdWr ์žก์•„์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ์ดˆ๋ณด์ž๋Š” ๋Œ€๋ถ€๋ถ„์˜ ์Šคํƒ€์ผ ์ฃผ์„์„ ๋ฐ›์Šต๋‹ˆ๋‹ค. ์ฝ”๋”ฉ ์ง€์นจ ์„ ์ฝ์–ด๋ณด์‹ญ์‹œ์˜ค. ์ฃผ๋กœ ์ฃผ๋ณ€ ์ฝ”๋“œ์˜ ์Šคํƒ€์ผ์„ ๋”ฐ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜์‹ญ์‹œ์˜ค(ShouldBeErrorId ํ•จ์ˆ˜ ์‚ฌ์šฉ). ์ ์ ˆํ•œ Resx ํŒŒ์ผ์— ์ƒˆ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋ฅผ ๋„ฃ์Šต๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰