Yoast/plugin-development-docker

$(pwd) command case sensitivity issues

Closed this issue · 0 comments

Users can have a working directory in the documents folder of their mac. Some shells allow for case-insensitive working directories, where /Users/name/Documents is the same as /Users/name/documents. However when comparing the docker label (which is absolute) with the shell script that uses pwd there can be a mismatch in case sensitivity. This can cause the script to not see any running containers and fail, for example, installing plugins. At least, that is my conclusion.

pwd -P would normally rectify this, but it seems that calling this from a subshell (script) does not work, and the directory path stays lowercase.

I am looking for a way to get the absolute path from a subshell, or else we should resort to lowercasing every output before comparing.