Skip to content

Commit f3a5018

Browse files
authored
Update Package.swift to remove Foundation import (#3)
Prefer using `PackageDescription.Context.environment` instead of using `ProcessInfo().environment` directly.
1 parent 1322f48 commit f3a5018

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

Examples/Life/Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// swift-tools-version: 5.9
22

3-
import Foundation
43
import PackageDescription
54

65
let gccIncludePrefix =
76
"/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1"
8-
guard let home = ProcessInfo().environment["HOME"] else {
7+
guard let home = Context.environment["HOME"] else {
98
fatalError("could not determine home directory")
109
}
1110

Examples/SwiftBreak/Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// swift-tools-version: 5.9
22

3-
import Foundation
43
import PackageDescription
54

65
let gccIncludePrefix =
76
"/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1"
8-
guard let home = ProcessInfo().environment["HOME"] else {
7+
guard let home = Context.environment["HOME"] else {
98
fatalError("could not determine home directory")
109
}
1110

Examples/Template/Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// swift-tools-version: 5.9
22

3-
import Foundation
43
import PackageDescription
54

65
let gccIncludePrefix =
76
"/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1"
8-
guard let home = ProcessInfo().environment["HOME"] else {
7+
guard let home = Context.environment["HOME"] else {
98
fatalError("could not determine home directory")
109
}
1110

Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// swift-tools-version: 5.9
22

3-
import Foundation
43
import PackageDescription
54

65
let gccIncludePrefix =
76
"/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1"
8-
guard let home = ProcessInfo.processInfo.environment["HOME"] else {
7+
guard let home = Context.environment["HOME"] else {
98
fatalError("could not determine home directory")
109
}
1110

0 commit comments

Comments
 (0)