diff --git a/src/commands/create/command.ts b/src/commands/create/command.ts index 57c42b7..d41381b 100644 --- a/src/commands/create/command.ts +++ b/src/commands/create/command.ts @@ -74,10 +74,15 @@ export class CreateCommand extends BaseCommandHandler { process.exit(0); } catch (error) { - logger.error( - // eslint-disable-next-line max-len - `Encountered an error. Cleaning up working directory. Run command with ${chalk.yellow('DEBUG=true')} to see error details.`, - ); + if (process.env.DEBUG === 'true') { + logger.error(error); + } else { + logger.error( + // eslint-disable-next-line max-len + `Encountered an error. Cleaning up working directory. Run command with ${chalk.yellow('DEBUG=true')} to see error details.`, + ); + } + logger.info(reportIssuesTip); await this.cleanProjectDirectory(); @@ -89,7 +94,7 @@ export class CreateCommand extends BaseCommandHandler { try { await fs.rm(path.join(process.cwd(), this.options.projectName), { recursive: true, force: true }); } catch (err) { - if (process.env.DEBUG === 'true') logger.debug(err); + if (process.env.DEBUG === 'true') logger.warn(err); // Fail silently } } diff --git a/src/commands/create/handlers/LibrarySetup.handler.ts b/src/commands/create/handlers/LibrarySetup.handler.ts index 96c035d..5205101 100644 --- a/src/commands/create/handlers/LibrarySetup.handler.ts +++ b/src/commands/create/handlers/LibrarySetup.handler.ts @@ -62,7 +62,7 @@ export class LibrarySetupHandler extends BaseCommandHandler } } catch (error) { // Do nothing, not all plugins/adapters will have an init script - if (process.env.DEBUG === 'true') logger.debug(error); + if (process.env.DEBUG === 'true') logger.warn(error); } }