From e6bd6b77493dc00b6a9e3c38172973cc618562d6 Mon Sep 17 00:00:00 2001
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
Date: Mon, 4 Jan 2021 12:24:12 +0200
Subject: [PATCH] Replace "file(s)" with "file" or "files" (#159)

---
 src/upload-artifact.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/upload-artifact.ts b/src/upload-artifact.ts
index d7011bc..4722be1 100644
--- a/src/upload-artifact.ts
+++ b/src/upload-artifact.ts
@@ -31,8 +31,9 @@ async function run(): Promise<void> {
         }
       }
     } else {
+      const s = searchResult.filesToUpload.length === 1 ? '' : 's'
       core.info(
-        `With the provided path, there will be ${searchResult.filesToUpload.length} file(s) uploaded`
+        `With the provided path, there will be ${searchResult.filesToUpload.length} file${s} uploaded`
       )
       core.debug(`Root artifact directory is ${searchResult.rootDirectory}`)