Make more properties of MainShellContext lazy.

Will be important later on if/when I implement truly global standard input/output redirection.
This commit is contained in:
Kare Morstol
2015-09-22 01:56:25 +02:00
parent 1ce3f6e165
commit 638fb719df
+4 -4
View File
@@ -29,11 +29,11 @@ public final class MainShellContext: ShellContextType {
// TODO: get encoding from environmental variable LC_CTYPE
public var encoding = NSUTF8StringEncoding
public var env = NSProcessInfo.processInfo().environment as [String: String]
public lazy var env = NSProcessInfo.processInfo().environment as [String: String]
public var stdin = NSFileHandle.fileHandleWithStandardInput() //as ReadableStreamType
public var stdout = NSFileHandle.fileHandleWithStandardOutput() //as WriteableStreamType
public var stderror = NSFileHandle.fileHandleWithStandardError() //as WriteableStreamType
public lazy var stdin = NSFileHandle.fileHandleWithStandardInput() //as ReadableStreamType
public lazy var stdout = NSFileHandle.fileHandleWithStandardOutput() //as WriteableStreamType
public lazy var stderror = NSFileHandle.fileHandleWithStandardError() //as WriteableStreamType
/**
The current working directory.