Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Plugins/AWSLambdaPackager/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct AWSLambdaPackager: CommandPlugin {
}

let builtProducts: [LambdaProduct: URL]
if self.isAmazonLinux2() {
if self.isAmazonLinux() {
// build directly on the machine
builtProducts = try self.build(
packageIdentity: context.package.id,
Expand Down Expand Up @@ -289,11 +289,11 @@ struct AWSLambdaPackager: CommandPlugin {
return archives
}

private func isAmazonLinux2() -> Bool {
private func isAmazonLinux() -> Bool {
if let data = FileManager.default.contents(atPath: "/etc/system-release"),
let release = String(data: data, encoding: .utf8)
{
return release.hasPrefix("Amazon Linux release 2")
return release.hasPrefix("Amazon Linux")
} else {
return false
}
Expand Down
Loading