ScriptCommandLineAppender.java

  1. package com.github.casperjs.casperjsrunner.cmd;

  2. import org.apache.commons.exec.CommandLine;

  3. public class ScriptCommandLineAppender implements CommandLineAppender {

  4.     @Override
  5.     public void append(final CommandLine cmdLine, final Parameters parameters) {
  6.         if (parameters.getScriptFile() != null) {
  7.             cmdLine.addArgument(parameters.getScriptFile().getAbsolutePath());
  8.         } else {
  9.             throw new MissingScriptFileException();
  10.         }
  11.     }

  12. }