Closed MiguelMadero closed 7 years ago
/cc @nathanhammond
Dammit @rwjblue! I was this close to keeping this as fs.existsSync
! 😜 Going to write a test and revert that part of the change until we can fix exists-sync
.
HAHA, but just think about how much better we'll be for knowing that exists-sync has this bug!
The new code to handle exceptions incorrectly assumes that a symlink doesn't exist and thinks that srcDir is undefined
throw new Error('You specified a
"srcDir": ' + this.srcDir + 'which does not exist and did not specify
"allowEmpty": true.');
The problem seems to be on
exists-sync
that doesn't expand the path correctly.Example:
That will create a symlink like:
When calling
existsSync(/Users/mmadero/code-zenefits/yourPeople3-bkp3/component-library/tmp/funnel-input_base_path-9rLzS07l.tmp/0 );
, it returns false.When it gets the
relativeLink
on https://github.com/ember-cli/exists-sync/blob/master/index.js#L15 from"/Users/mmadero/code-zenefits/yourPeople3-bkp3/component-library/../static/js/
it goes toUsers/mmadero/code-zenefits/yourPeople3-bkp3/component-library/js
.There're no tests for this scenario on exists-sync, but I wanted to raise the issue in both repos in case someone runs into this or in case someone gets a chance to fix it before I do.
Diff