From 06f1edb54406899a8289ac3e057a5c534c52532e Mon Sep 17 00:00:00 2001 From: Florian Richter Date: Thu, 9 Jan 2020 10:57:46 +0100 Subject: [PATCH] Hotfix wrong or unnecessary warnings (#45) --- src/utils/package-json.ts | 2 +- src/utils/scaffold.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/package-json.ts b/src/utils/package-json.ts index a5e78bf4..03310f0b 100755 --- a/src/utils/package-json.ts +++ b/src/utils/package-json.ts @@ -155,7 +155,7 @@ async function addDependencyVersions(dependencies: string[] = []): Promise<{ [ke async function getVersionOfDependency(dependency: string): Promise { try { const args = ['view', dependency, 'version']; - const version = dependency.includes('@sap') ? execa('npm', [...args, '--registry', 'https://npm.sap.com']) : execa('npm', args); + const version = dependency.includes('@sap/') ? execa('npm', [...args, '--registry', 'https://npm.sap.com']) : execa('npm', args); return `^${(await version).stdout}`; } catch (e) { diff --git a/src/utils/scaffold.ts b/src/utils/scaffold.ts index 8a0f46aa..2e93b428 100644 --- a/src/utils/scaffold.ts +++ b/src/utils/scaffold.ts @@ -63,7 +63,6 @@ function modifyMainTs(pathToMainTs: string) { if (!modifiedMainTs.includes(modifiedListen)) { recordWarning('Could not set listening port to `process.env.PORT`', 'in file `app.module.ts`. Please adjust manually.'); } else { - recordWarning('Could not set listening port to `process.env.PORT`', 'in file `app.module.ts`. Please adjust manually.'); fs.writeFileSync(pathToMainTs, modifiedMainTs); } }