From 356393088b1fa48bf64a5fb9d91330938b5edf70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Bu=CC=88gling?= Date: Tue, 8 Dec 2015 16:54:58 +0100 Subject: [PATCH] Support for Linux --- Sources/Template.swift | 4 ++++ Sources/Variable.swift | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Sources/Template.swift b/Sources/Template.swift index f3d236a..86893d2 100644 --- a/Sources/Template.swift +++ b/Sources/Template.swift @@ -1,6 +1,10 @@ import Foundation import PathKit +#if os(Linux) +let NSFileNoSuchFileError = 4 +#endif + /// A class representing a template public class Template { let tokens: [Token] diff --git a/Sources/Variable.swift b/Sources/Variable.swift index 0d80a4d..70b8d65 100644 --- a/Sources/Variable.swift +++ b/Sources/Variable.swift @@ -71,7 +71,11 @@ public struct Variable : Equatable, Resolvable { current = array.count } } else if let object = current as? NSObject { // NSKeyValueCoding +#if os(Linux) + return nil +#else current = object.valueForKey(bit) +#endif } else { return nil }