Skip to content

Commit cd3f5b3

Browse files
author
bweigel
committed
- skip requirement generation, if no requirements file is present
1 parent 087c5be commit cd3f5b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/pip.js

+5
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@ function installRequirementsIfNeeded(
385385
// Our source requirements, under our service path, and our module path (if specified)
386386
const fileName = path.join(servicePath, modulePath, options.fileName);
387387

388+
// Skip requirements generation, if requirements file doesn't exist
389+
if (!fse.existsSync(fileName)) {
390+
return false;
391+
}
392+
388393
let requirementsTxtDirectory;
389394
// Copy our requirements to another filename in .serverless (incase of individually packaged)
390395
if (modulePath && modulePath != '.') {

0 commit comments

Comments
 (0)