Leading and trailing whitespace for values in starter.ini can break the system #174
Labels
bug
Something isn't working
passed-dev-qa
Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main
Milestone
Describe the bug
Putting leading or trailing whitespace in a value in starter.ini can cause hard to track bugs
Ideally all leading or trailing whitespace should be removed from values when they are parsed but realistically for interim the leading and trailing whitespace values may just need to be trimmed after they are parsed.
Screenshots
Steps to reproduce
in starter.ini add some trailing whitespace to
version=7.4
in the[PHP]
sectionThe php version will now be invalid and will fall back to 'latest'
Expected behavior
Leading or trailing whitespace should not break the value
Additional information
This problem could happen in alot of places so it should probably be fixed in the parsing utility rather than everywhere a value is parsed. Although doing it this way would make the parsing function less 'multipurpose'.
Perhaps a flag can be passed to the function as a third argument that would preserve all whitespace.
See the
parse_ini_value
function in https://github.com/apolopena/gitpod-laravel-starter/blob/main/.gp/bash/utils.sh for the parsing utility function.The text was updated successfully, but these errors were encountered: