mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
fix(Packaging): Fix package.artifact validation for S3 urls
This commit is contained in:
parent
a2f7c00e2c
commit
ab3c543089
@ -6,6 +6,7 @@ const globby = require('globby');
|
||||
const _ = require('lodash');
|
||||
const micromatch = require('micromatch');
|
||||
const ServerlessError = require('../../../serverless-error');
|
||||
const parseS3URI = require('../../aws/utils/parse-s3-uri');
|
||||
|
||||
module.exports = {
|
||||
defaultExcludes: [
|
||||
@ -77,6 +78,7 @@ module.exports = {
|
||||
return;
|
||||
}
|
||||
if (functionObject.package.artifact) {
|
||||
if (parseS3URI(functionObject.package.artifact)) return;
|
||||
try {
|
||||
await fsp.access(
|
||||
path.resolve(this.serverless.serviceDir, functionObject.package.artifact)
|
||||
@ -109,6 +111,7 @@ module.exports = {
|
||||
await Promise.all(packagePromises);
|
||||
if (shouldPackageService) {
|
||||
if (this.serverless.service.package.artifact) {
|
||||
if (parseS3URI(this.serverless.service.package.artifact)) return;
|
||||
try {
|
||||
await fsp.access(
|
||||
path.resolve(this.serverless.serviceDir, this.serverless.service.package.artifact)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user