                                    dismissable: true
   doRsync: (cmd) ->
     cmdStr = 'rsync -a ' + cmd
-    console.log cmdStr
+    # console.log cmdStr
     try
       return execSync cmdStr, timeout:5e3, encoding:'utf8', maxBuffer:10e6
     catch e

                                   dismissable: true
  doSSH: (cmd) ->
    cmdStr = 'ssh ' + @server + ' ' + cmd
    console.log cmdStr
    try
      return execSync cmdStr, timeout:5e3, encoding:'utf8', maxBuffer:10e6
    catch e

                   then " --exclude=.git --filter=':- .gitignore' " else ' ')
      @doRsync gitIgnStr + "#{@rootDirPath}/ #{remotePath}/"
      
    script = (if action is 'save' then @setup.options.scriptRunOnSave \
                                  else @setup.options.scriptRunOnCommand)
    if script
      remoteScript = "#{remotePath}/#{script}"
      @doRsync "#{@serverScriptFolder}/#{script} #{remoteScript}"
      @doSSH "chmod +x #{root}/#{script}"
      if @setup.options.logToConsole
        console.log 'server-script: starting', remoteScript
      child = spawn 'ssh', [@server, "#{root}/#{script}"]
      if @setup.options.logToConsole
        child.stdout.on 'data', (data) ->
          console.log 'server-script, stdout:', data.toString()
        child.stderr.on 'data', (data) ->
          console.log 'server-script, stderr:', data.toString()
      child.on 'error', (err) ->
        atom.notifications.addError \
          "Error executing script #{remoteScript}: " + err.message,
           dismissable: true
        # child = null
      child.on 'close', (code) =>
        if code isnt 0
          atom.notifications.addWarning \
            "#{remoteScript} returned code: " + code, dismissable: true
        if @setup.options.logToConsole
          console.log 'server-script: script', remoteScript, 'exited with code:', code
        # child = null
          
  deactivate: ->
    @subs.dispose()

