File tree 1 file changed +10
-4
lines changed
Plugins/AWSLambdaPackager
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -245,10 +245,16 @@ struct AWSLambdaPackager: CommandPlugin {
245
245
let resourcesDirectoryName = artifactURL. lastPathComponent
246
246
let relocatedResourcesDirectory = workingDirectory. appending ( resourcesDirectoryName)
247
247
if FileManager . default. fileExists ( atPath: artifactURL. path ( ) ) {
248
- try FileManager . default. copyItem (
249
- atPath: artifactURL. path ( ) ,
250
- toPath: relocatedResourcesDirectory. string
251
- )
248
+ do {
249
+ try FileManager . default. copyItem (
250
+ atPath: artifactURL. path ( ) ,
251
+ toPath: relocatedResourcesDirectory. string
252
+ )
253
+ } catch {
254
+ // Dangerous workaround for https://github.com/swift-server/swift-aws-lambda-runtime/issues/449#issuecomment-2595978246
255
+ print ( " WARNING: Failed to copy resources item \( resourcesDirectoryName) . The files may have been copied anyway, check your build. Error: \( error) " )
256
+ }
257
+
252
258
arguments. append ( resourcesDirectoryName)
253
259
}
254
260
}
You can’t perform that action at this time.
0 commit comments