You are here

function _coder_drush_is_patch_arg in Coder 6.2

Same name and namespace in other branches
  1. 6 coder.drush.inc \_coder_drush_is_patch_arg()
1 call to _coder_drush_is_patch_arg()
coder_drush_review in ./coder.drush.inc

File

./coder.drush.inc, line 171
Command line utility for coder.

Code

function _coder_drush_is_patch_arg(&$arg) {
  if (drupal_substr($arg, 0, 7) == 'http://' || is_file(realpath($arg))) {
    return TRUE;
  }

  // @NOTE: relies on http://drupal.org/node/297611
  if (isset($_SERVER['OLDPWD'])) {
    $path = $_SERVER['OLDPWD'] . '/' . $arg;
    if (is_file($path)) {
      $arg = $path;
      return TRUE;
    }
  }
}