🐛 format
This commit is contained in:
5
bin/builders/BaseBuilder.ts
vendored
5
bin/builders/BaseBuilder.ts
vendored
@@ -70,7 +70,10 @@ export default abstract class BaseBuilder {
|
||||
timeout,
|
||||
);
|
||||
} else {
|
||||
await shellExec(`cd "${npmDirectory}" && ${packageManager} install`, timeout);
|
||||
await shellExec(
|
||||
`cd "${npmDirectory}" && ${packageManager} install`,
|
||||
timeout,
|
||||
);
|
||||
}
|
||||
spinner.succeed(chalk.green('Package installed!'));
|
||||
if (!tauriTargetPathExists) {
|
||||
|
||||
4
bin/utils/shell.ts
vendored
4
bin/utils/shell.ts
vendored
@@ -13,13 +13,13 @@ export async function shellExec(command: string, timeout: number = 300000) {
|
||||
} catch (error: any) {
|
||||
const exitCode = error.exitCode ?? 'unknown';
|
||||
const errorMessage = error.message || 'Unknown error occurred';
|
||||
|
||||
|
||||
if (error.timedOut) {
|
||||
throw new Error(
|
||||
`Command timed out after ${timeout}ms: "${command}". Try increasing timeout or check network connectivity.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
throw new Error(
|
||||
`Error occurred while executing command "${command}". Exit code: ${exitCode}. Details: ${errorMessage}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user