diff --git a/SwiftShell/Context.swift b/SwiftShell/Context.swift index 2755b7a..ae4cb95 100644 --- a/SwiftShell/Context.swift +++ b/SwiftShell/Context.swift @@ -52,7 +52,8 @@ public final class MainShellContext: ShellContextType { } } - public lazy var arguments: [String] = Process.arguments.isEmpty ? [] : Array(Process.arguments.dropFirst()) + + public lazy var arguments: [String] = Process.arguments.count <= 1 ? [] : Array(Process.arguments.dropFirst()) public lazy var name: String = Process.arguments.first.map(NSURL.init)?.lastPathComponent ?? "" private init() {