Skip to content

Commit 49fdd37

Browse files
committed
Not removing reqs.txt from Pipfile, oops
1 parent b659f7e commit 49fdd37

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/pip.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,7 @@ function installRequirementsIfNeeded(servicePath, modulePath, options, serverles
232232
// First, generate the requirements file to our local .serverless folder
233233
fse.ensureDirSync(path.join(servicePath, '.serverless'));
234234
const slsReqsTxt = path.join(servicePath, '.serverless', 'requirements.txt');
235-
// Incase it's laying around from a previous package (when individually/failed packaging)
236-
if (fse.existsSync(slsReqsTxt)) {
237-
fse.removeSync(slsReqsTxt);
238-
}
235+
239236
installRequirementsFile(
240237
fileName,
241238
slsReqsTxt,
@@ -267,7 +264,6 @@ function installRequirementsIfNeeded(servicePath, modulePath, options, serverles
267264
serverless.cli.log(`Using static cache of requirements found at ${workingReqsFolder} ...`);
268265
// We'll "touch" the folder, as to bring it to the start of the FIFO cache
269266
fse.utimesSync(workingReqsFolder, new Date(), new Date());
270-
fse.removeSync(slsReqsTxt);
271267
return workingReqsFolder;
272268
}
273269
// Remove our old folder if it didn't complete properly, but _just incase_ only remove it if named properly...
@@ -302,7 +298,6 @@ function installRequirementsIfNeeded(servicePath, modulePath, options, serverles
302298
if (options.useStaticCache) {
303299
fse.closeSync(fse.openSync(path.join(workingReqsFolder, '.completed_requirements'), 'w'));
304300
}
305-
fse.removeSync(slsReqsTxt); // Clean up after ourselves
306301
return workingReqsFolder;
307302
}
308303

0 commit comments

Comments
 (0)