From 6435c3f71f8443d629a4cbbefd48b65de179d485 Mon Sep 17 00:00:00 2001 From: Adam Bertram Date: Fri, 14 Apr 2017 21:09:05 -0400 Subject: [PATCH] Update New-LogEntry.ps1 --- Text Files/New-LogEntry.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Text Files/New-LogEntry.ps1 b/Text Files/New-LogEntry.ps1 index 64a7ce1..b4b8fff 100644 --- a/Text Files/New-LogEntry.ps1 +++ b/Text Files/New-LogEntry.ps1 @@ -1,4 +1,4 @@ -function New-LogEntry { +function New-LogEntry { <# .SYNOPSIS This function appends a row to a tab-separated text file with a timestamp, log message and a time @@ -46,6 +46,7 @@ foreach ($Value in $Values) { $Split = $Value.Split(' ') $Value = $Split[0] + $Label = $Split[1] if ($AllowedLabels -notcontains $Label) { Write-Error "The label '$Label' is not a valid time label" return $false @@ -53,7 +54,6 @@ Write-Error "The time value '$Value' is not a valid time interval" return $false } else { - $Label = $Split[1] ## Make the label plural (if it's not already) to match New-TimeSpan's property name if ($Label.Substring($Label.Length - 1, 1) -ne 's') { $Label = $Label + 's' @@ -96,4 +96,4 @@ $false } } -} \ No newline at end of file +}