You are here

function _coder_drush_is_patch_arg in Coder 6

Same name and namespace in other branches
  1. 6.2 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 101

Code

function _coder_drush_is_patch_arg(&$arg) {
  if (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;
    }
  }
}