Composer building to an ~ directory?

I get this issue occasionally where Composer will make all the changes to a ~ directory in the root?

Anyone know how to fix this? I tried to rebuild the workspace index and i cleared some caches, but it still does it.