Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Hotfix wrong or unnecessary warnings #45

Merged
merged 1 commit into from
Jan 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ async function addDependencyVersions(dependencies: string[] = []): Promise<{ [ke
async function getVersionOfDependency(dependency: string): Promise<string> {
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) {
Expand Down
1 change: 0 additions & 1 deletion src/utils/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down