- let trackName: String = CommandLine.arguments[2]
- let trackArtist: String = CommandLine.arguments[1]
+ if CommandLine.arguments.count >= 3 {
+ // expected usage: $ ./lyricli <artist> <name>
+ let trackName: String = CommandLine.arguments[2]
+ let trackArtist: String = CommandLine.arguments[1]