buf
buf copied to clipboard
Return a more user-friendly error in workspace targeting for overlaps
In the past, if the an overlap is found between moduleDirPath and inputPath,
but inputPath does not exist (e.g. moduleDirPath == "." and inputPath == "fake-path")
then it would return the error:
failed to build input "fake-path" because it is contained by module at path "." specified in your configuration, you must provide the workspace or module as the input, and filter to this path using --path"
Which isn't particularly clear, since fake-path doesn't exist. Added a check to return a
nicer error to the user by checking inputPath. Also included test cases for v1 and v2
workspaces.
Let's punt this until after the release