From ec86ce15c7b79ca5228ec566c4d34f07ab8a3954 Mon Sep 17 00:00:00 2001 From: Lammert Westerhoff Date: Thu, 19 Sep 2019 10:25:08 +0200 Subject: [PATCH] Make EnvironmentVariable name publicly accessible --- Sources/EnvironmentVariable/EnvironmentVariable.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/EnvironmentVariable/EnvironmentVariable.swift b/Sources/EnvironmentVariable/EnvironmentVariable.swift index 8296929..9bfdfa1 100644 --- a/Sources/EnvironmentVariable/EnvironmentVariable.swift +++ b/Sources/EnvironmentVariable/EnvironmentVariable.swift @@ -23,7 +23,7 @@ import Foundation /// [Environment variables in Mac OSX](https://stackoverflow.com/a/4567308) @propertyWrapper public struct EnvironmentVariable { - var name: String + public var name: String public var wrappedValue: String? { get { @@ -38,4 +38,8 @@ public struct EnvironmentVariable { setenv(name, value, 1) } } + + public init(name: String) { + self.name = name + } }