 request = require 'request'
 path = require 'path'
 shell = require 'shelljs'
+os = require 'os'
 
 # we will log our progress in ES
 elasticsearch = require('elasticsearch')

        cmd = "cd #{userfolder};git clone https://#{token}@gist.github.com/#{gist.id}"
      else
        cmd = "cd #{userfolder};git clone git@gist.github.com:#{gist.id}"

      shell.exec cmd, (code, huh, message) ->
        if code or message
          console.log gist.id, user, code, message


base = __dirname + "/data/gists-clones/"
timeouts = []

winshellCheck = (cmd) ->
    return if os.platform() == 'win32' then cmd.replace(';','&') else cmd

done = (err, pruned) ->
  console.log "done writing files"
