Skip to content

Commit

Permalink
Update Package.swift to remove Foundation import (#3)
Browse files Browse the repository at this point in the history
Prefer using `PackageDescription.Context.environment` instead of
using `ProcessInfo().environment` directly.
  • Loading branch information
Kyle-Ye authored Mar 14, 2024
1 parent 1322f48 commit f3a5018
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Examples/Life/Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// swift-tools-version: 5.9

import Foundation
import PackageDescription

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

Expand Down
3 changes: 1 addition & 2 deletions Examples/SwiftBreak/Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// swift-tools-version: 5.9

import Foundation
import PackageDescription

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

Expand Down
3 changes: 1 addition & 2 deletions Examples/Template/Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// swift-tools-version: 5.9

import Foundation
import PackageDescription

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

Expand Down
3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// swift-tools-version: 5.9

import Foundation
import PackageDescription

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

Expand Down

0 comments on commit f3a5018

Please sign in to comment.