Last active
December 11, 2019 13:20
-
-
Save drrost/a1e52a72e3c4583310336cd1c9dd02f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
func readVariable(_ name: String) -> String { | |
if let value = ProcessInfo.processInfo.environment[name] { | |
return value | |
} | |
return "" | |
} | |
let homePath = readVariable("HOME") | |
print(homePath) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment