 _ = require 'underscore-plus'
+shell = require 'shelljs'
 ProcessConfig = require '../process-config'
-{BufferedProcess, Directory, File} = require 'atom'
+{Directory, File} = require 'atom'
+# {BufferedProcess} = require 'atom'
 
 # Fields :
 # stdout : Standard output.


    if args.length > 0
      @fields.fullCommand += " " + args.join(" ");

    stdout = (output) =>
      @fields.stdout += output;

    stderr = (output) =>
      @fields.stderr += output;

    exit = (exitStatus) =>
      @fields.exitStatus = exitStatus;
      @processStopped(false);

    @process = new BufferedProcess({command, args, options, stdout, stderr, exit});
    @process.onWillThrowError(@handleProcessErrorCallback);
    @processStarted();

  splitFileName: (fileNameExt) ->
    index = fileNameExt.lastIndexOf(".");

    @disposable.dispose();

  runProcess: =>
    editor = atom.workspace.getActiveTextEditor();

    if editor
      @runProcessWithFile(editor.getPath());
    else
      @runProcessWithFile(null);

  runProcessWithFile: (filePath) =>
    if @process
      return;

