New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for if git exists #5444

Merged
merged 2 commits into from Jan 15, 2017

Conversation

Projects
None yet
6 participants
@geordish
Contributor

geordish commented Jan 15, 2017

Should hopefully not stop validate running if git is missing.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

@mention-bot

This comment has been minimized.

mention-bot commented Jan 15, 2017

Thank you for submitting a PR @geordish! We have found the following @murrant, @laf and @paulgear based on the history of these files to review this PR.

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 15, 2017

Auto-Deploy finished, Test PR at http://5444.ci.librenms.org or https://5444.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 15, 2017

Auto-Deploy finished, Test PR at http://5444.ci.librenms.org or https://5444.ci.librenms.org

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Jan 15, 2017

The inspection completed: 1 updated code elements

@@ -75,6 +75,11 @@
exit;
}
$git_found = check_git_exists();
if ($git_found !== true) {

This comment has been minimized.

@Gorian

Gorian Jan 15, 2017

Contributor

could you use if (!$git_found){ instead?

if ($config['update_channel'] == 'master' && $cur_sha != $versions['github']['sha']) {
$commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get()));
print_warn("Your install is out of date, last update: " . $commit_date->format('r'));
if ($git_found === true) {

This comment has been minimized.

@Gorian

Gorian Jan 15, 2017

Contributor

could you use if ($git_found){ here?

This comment has been minimized.

@laf

laf Jan 15, 2017

Member

=== is better, it's more explicit

This comment has been minimized.

@Gorian

Gorian Jan 15, 2017

Contributor

Alright, as long as we are doing it purposefully, you are the master of the php code ;)

@Gorian

This comment has been minimized.

Contributor

Gorian commented Jan 15, 2017

I think that @mention-bot thing is really cool. Look at who last contributed to a file and then mention them to review new changes.

@laf laf merged commit 44071e8 into librenms:master Jan 15, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment