title: NSTask with defaults and killall bash commands
body: <p>I am trying to run the following two bash commands in a Cocoa app:</p>
  
  <pre><code>defaults write com.apple.finder CreateDesktop false
  killall Finder
  </code></pre>
  
  <p>Using NSTask, I have the following Swift code to execute the command when a button is clicked:</p>
  
  <pre><code>let commands = ["-c", "defaults write com.apple.finder CreateDesktop false",
                  "-c", "killall Finder"]
  
  let task = NSTask()
  task.launchPath = "/bin/bash"
  task.arguments = commands
  task.launch()
  </code></pre>
  
  <p>I get no errors when running the code. But nothing actually happens when the button is clicked. Any suggestions?</p>