diff --git a/git_deploy.module b/git_deploy.module index 3cb905e..3535912 100644 --- a/git_deploy.module +++ b/git_deploy.module @@ -146,8 +146,8 @@ function git_deploy_update_status_alter(&$projects) { // Make sure Git operates in the right directory. $git = 'git -C ' . drupal_get_path(preg_replace('/-disabled$/', '', $project_info['project_type']), key($project_info['includes'])); // Verify that we are in a Git repository. - $directory = exec("$git rev-parse --show-toplevel 2> " . GIT_DEPLOY_ERROR_DUMP); - if (!empty($directory)) { + exec("$git rev-parse 2> " . GIT_DEPLOY_ERROR_DUMP, $output, $return_val); + if ($return_val === 0) { $version = $project_info['existing_version']; if (isset($project_info['releases'][$version])) { $release = $project_info['releases'][$version];