From 07b21870494d9642d3bf215b779b20ed2840e795 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 29 Sep 2021 19:51:50 -0500 Subject: [PATCH] fix: add message about restarting the shell --- src/main.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main.ts b/src/main.ts index 36c9394a..c8a37f33 100644 --- a/src/main.ts +++ b/src/main.ts @@ -184,6 +184,24 @@ export async function main(args: string[]): Promise { errorMessages.forEach((tool) => error(tool)) core.info("setup_cpp finished") + + if (!isCI()) { + switch (process.platform) { + case "win32": { + core.info("Run `RefreshEnv.cmd` or restart your shell to update the environment.") + break + } + case "linux": + case "darwin": { + core.info("Run `source ~/.profile` or restart your shell to update the environment.") + break + } + default: { + // nothing + } + } + } + return errorMessages.length === 0 ? 0 : 1 // exit with non-zero if any error message } // Run main