Skip to content

Commit

Permalink
optional chaingin
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Nov 18, 2024
1 parent fe871a5 commit 3eff6ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/contentstack-migration/src/utils/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ function executeShellCommand(command, directory = '') {
const [cmd, ...args] = command.split(' ');
const result = spawnSync(cmd, args, { stdio: 'inherit', cwd: directory, shell: true });

if (result.error) throw result.error;
if (result?.error) throw result.error;
console.log(`Command executed successfully: ${command}`);
} else {
console.log(`Command should only be 'npm i <package-name>'`);
}
} catch (error) {
console.error(`Command execution failed. Error: ${error.message}`);
console.error(`Command execution failed. Error: ${error?.message}`);
}
}
async function installModules(filePath, multiple) {
Expand Down

0 comments on commit 3eff6ad

Please sign in to comment.