welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

Doctor doesn't know Vhost can be stored in .env file. #535

Closed Gadgitmatic closed 2 years ago

Gadgitmatic commented 5 years ago

I've stored all my personally identifying information in a .env file rather than the movefile itself. This works great! Though, when running wordmove doctor it gives the following error:

 ▬▬ Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ Validating movefile section: global ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | Formal validation passed

▬▬ Validating movefile section: local ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | Formal validation passed

▬▬ Validating movefile section: production ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ❌  error | [/vhost] '': not matched to pattern /^https?:\/\//.

▬▬ Validating movefile section: stg ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ❌  error | [/vhost] '': not matched to pattern /^https?:\/\//.

This is somewhat of a false-flag since the vhost is correct, just that it's found in the .env file not the movefile.

This is what my movefile looks like

production:
    vhost: "<%= ENV['Pvhost'] %>"
    wordpress_path: "<%= ENV['Ppath'] %>"

    database:
        name: "<%= ENV['PDB'] %>"
        user: "<%= ENV['USER'] %>"
        password: "<%= ENV['PASS'] %>"
        host: "localhost"
    ssh:
        host: "<%= ENV['SSH'] %>"

  stg:
    vhost: "<%= ENV['Svhost'] %>"
    wordpress_path: "<%= ENV['Spath'] %>"

    database:
        name: "<%= ENV['SDB'] %>"
        user: "<%= ENV['USER'] %>"
        password: "<%= ENV['PASS'] %>"
        host: "localhost"
    ssh:
        host: "<%= ENV['SSH'] %>" 
alessandro-fazzi commented 5 years ago

@Gadgitmatic probably the fact is that it is a bug: doctor was implemented before .env support (a big and awesome community contributed feature) and I think the latter was not introduced into the doctor's logic. My fault to have had a tunnel vision while revisioning the .env's PR.

I'll take the time to confirm my theory and eventually to label this as a bug.

Thank you very much

Gadgitmatic commented 5 years ago

I figured it was just that the '.env' logic hadn't been included into 'doctor' just yet. Certainly not a major bug.

Once again, glad I can contribute and thank you for your work!

On Fri, Jul 5, 2019, 7:49 AM Alessandro Fazzi notifications@github.com wrote:

@Gadgitmatic https://github.com/Gadgitmatic probably the fact is that it is a bug: doctor was implemented before .env support (a big and awesome community contributed feature) and I think the latter was not introduced into the doctor's logic. My fault to have had a tunnel vision while revisioning the .env's PR.

I'll take the time to confirm my theory and eventually to label this as a bug.

Thank you very much

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/welaika/wordmove/issues/535?email_source=notifications&email_token=AG3VXO3EZN7JZWBJ2BY3WNDP54YM5A5CNFSM4H6C33R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJKPZI#issuecomment-508733413, or mute the thread https://github.com/notifications/unsubscribe-auth/AG3VXO2S3JHIGAYZGUBCIC3P54YM5ANCNFSM4H6C33RQ .

debonx commented 4 years ago

Same issue for me but not a biggie.

alessandro-fazzi commented 4 years ago

Yep, this is officially recognized like one of the confirmed bugs :)

alessandro-fazzi commented 2 years ago

I've not tracked where this was fixed, but in current alpha version (next release candidate) the problem doesn't occur anymore.

I know that's still alpha, but since I'm doing housekeepings, I'm going to close.

Ref: #624