Skip to content

Commit

Permalink
Test with try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
BassemNKhalil committed Nov 16, 2023
1 parent 87d8282 commit 17e72cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Commands/fastServe.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ const fastServeCommand = {

if (npmGlobalPackages.indexOf("spfx-fast-serve") === -1) {
chalk.Message("Installing spfx-fast-serve globally");
execSync("npm install spfx-fast-serve -g --silent");
try {
execSync("npm install spfx-fast-serve -g --silent");
} catch (error) {
console.log(error.Message);
}
chalk.Success("spfx-fast-serve installed");
} else {
chalk.Message("spfx-fast-serve already installed globally");
Expand Down

0 comments on commit 17e72cd

Please sign in to comment.