From 8784f9ff1d80a2c8b1896764b5d2d9b1cd322aab Mon Sep 17 00:00:00 2001 From: Russell Wheatley Date: Wed, 29 Nov 2023 17:52:54 +0000 Subject: [PATCH] fix: properly warn users not to use "=" character in pre or post deploy commands (#6503) Co-authored-by: joehan --- src/deploy/lifecycleHooks.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/deploy/lifecycleHooks.ts b/src/deploy/lifecycleHooks.ts index 4edc7b7c949..8be99eadb97 100644 --- a/src/deploy/lifecycleHooks.ts +++ b/src/deploy/lifecycleHooks.ts @@ -19,6 +19,13 @@ function runCommand(command: string, childOptions: childProcess.SpawnOptions) { return new Promise((resolve, reject) => { logger.info("Running command: " + command); + if (command.includes("=")) { + utils.logWarning( + clc.yellow(clc.bold("Warning: ")) + + "Your command contains '=', it may result in the command not running." + + " Please consider removing it." + ); + } if (translatedCommand === "") { return resolve(); }