 
 getDeviceList = ->
   try
-    execSync 'xcrun instruments -s devices'
+    exec 'xcrun instruments -s devices', true
       .toString()
       .split '\n'
       .filter (line) -> /^i/.test line

    if fs.existsSync projNameHyph
      throw new Error "Directory #{projNameHyph} already exists"

    execSync 'type lein'
    execSync 'type pod'
    execSync 'type watchman'

    podVersion = execSync('pod --version').toString().trim()
    unless semver.satisfies podVersion, ">=#{podMinVersion}"
      throw new Error """
                      Natal requires CocoaPods #{podMinVersion} or higher (you have #{podVersion}).

launch = ({name, device}) ->
  log 'Building Xcode project'
  try
    exec "
         xcodebuild
         -workspace iOS/iOS/#{name}.xcworkspace
         -scheme #{name}
         -destination platform='iOS Simulator',OS=latest,id='#{device}'
         clean test
         "

    log 'Launching simulator'
    exec "xcrun simctl launch #{device} #{getBundleId name}"

  catch {message}
    logErr message
