laminas / laminas-cli

Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
https://docs.laminas.dev/laminas-cli
BSD 3-Clause "New" or "Revised" License
55 stars 22 forks source link

Wrong $HOME and ~ support in custom vendor-dir config #59

Closed michalbundyra closed 3 years ago

michalbundyra commented 3 years ago

Bug Report

Q A
Version(s) 0.1.6 (not released yet)

Summary

Merged in #53. The issue is that custom vendor-dir can contain $HOME or ~, so it might be $HOME/custom-vendor etc. Currently we expect there to be just $HOME or ~.

I would suggest also checking if $home works and what would happen if we use /my/path/$HOME/../../something (or ~ somewhere in the middle).

Current behavior

commands are not recognised correctly if vendor directory is in home path

How to reproduce

set vendor-dir with $HOME or ~ and check if the command in the chain is recognised correctly

Expected behavior

commands are marked as 3rd party only when in vendor (not laminas and mezzio) even if vendor-dir is in home directory

weierophinney commented 3 years ago

Fixed with #61