Open tomwayson opened 6 years ago
getting the same issue when upgrading from 3.4.3 to 3.5
It seems this happens when running the codemod automatically against a non-existing directory. For example I was able to reproduce this with an addon, that had /tests/integration
but not /tests/acceptance
. Running the codemod with the integration transforms worked, but for acceptance it failed with the exception shown above.
It seems this is what's happening:
ember-cli-update
runs both codemods without checking for the existence of the directories (https://github.com/ember-cli/ember-cli-update-codemods-manifest/blob/v2/manifest.json#L19-L20)codemod-cli
does not check if the provided paths actually exist (I guess paths
returned from globby
is an empty array here: https://github.com/rwjblue/codemod-cli/blob/dd57dbaa2dade9f68aaeeed0410b9a2ae0d6046b/src/bin-support.js#L20)My approach would be to add a check to codemod-cli
, and exit gracefully with a warning message if paths
is empty.
Any other thoughts? /cc @rwjblue @kellyselden
Ya, seems good to me.
Does it make sense to infer all the options and instead run ember-test-helpers-codemod
only?
When I encountered this error, adding an empty tests/acceptance
directory wasn't enough to fix it, but generating a new acceptance test did. Just sharing that in case anyone is in a similar situation
I'm running this codemod as part of
ember-cli-update
and I get the following error:Then it shows below:
I'm upgrading my addon from 2.18 to 3.5 in steps for each minor (2.18 -> 3.0 -> 3.1 -> ...) and the above message is from after upgrading to 3.3, but I have seen the same message at each step that I've run this codemod on.