From 276165155402f467f6a4de570a4b6cdae7da514d Mon Sep 17 00:00:00 2001 From: Igwe Kalu Date: Wed, 7 Feb 2024 16:39:46 +0100 Subject: [PATCH] Improve createFile function to include file location in success message --- src/utils/writeToFile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/writeToFile.ts b/src/utils/writeToFile.ts index 15a47fc..2a3773f 100644 --- a/src/utils/writeToFile.ts +++ b/src/utils/writeToFile.ts @@ -30,8 +30,8 @@ export const createFile = async ( const writeFile = promisify(fs.writeFile); const data = JSON.stringify(list, null, 2); writeFile(fileLocation, data); - inform(`Success created repos.json`); - return { status: 200, message: "Success created repos.json" }; + inform(`Success created ${fileLocation}`); + return { status: 200, message: `Success created ${fileLocation}` }; } catch (err) { error(err); throw err;