Skip to content

Avoid using Rails method blank? in Diagnostic Environment

Peter Leitzen requested to merge pl-diagnostic-empty into main

What does this merge request do and why?

This fixes Enviornment Diagnostic via gdk doctor showing the following error:

gdk doctor                                                                         ──(Thu,Jun27)─┘
.......................
⚠️  WARNING: Your GDK may need attention.

Environment variables
================================================================================
undefined method `blank?' for nil:NilClass
/Users/mohamedhamda/gdk/lib/gdk/diagnostic/environment.rb:9:in `success?'
/Users/mohamedhamda/gdk/lib/gdk/command/doctor.rb:55:in `perform_diagnosis_for'
/Users/mohamedhamda/gdk/lib/gdk/command/doctor.rb:48:in `block (2 levels) in jobs

It also adds missing specs.

How to set up and validate locally

gdk doctor

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Peter Leitzen

Merge request reports