fivetanley / ember-cli-migrator

migrate your files to the standard ember-cli structure, preserving git history
MIT License
106 stars 22 forks source link

Error processing hbs files. #41

Closed kiwiupover closed 9 years ago

kiwiupover commented 9 years ago

Running on this repo. Maybe I'm doing something wrong?

ember-cli-migrator -g App -t . -s test -d test/fixtures/vanilla

On this repo errors when the migrator tries to process move .hbs files.

It looks related to output path.

Git Move Moving fixtures/vanilla/input/templates/atemplate.handlebars to app/templates/fixtures/vanilla/input/templates/atemplate.handlebars

/usr/local/lib/node_modules/ember-cli-migrator/node_modules/exec-sync/bin/index.js:68
        throw new Error(error);
              ^
Error: fatal: renaming 'test/fixtures/vanilla/input/templates/atemplate.handlebars' failed: No such file or directory
    at module.exports (/usr/local/lib/node_modules/ember-cli-migrator/node_modules/exec-sync/bin/index.js:68:15)
    at null.<anonymous> (/usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:116:7)
    at Array.forEach (native)
    at EmberMigrator_run [as run] (/usr/local/lib/node_modules/ember-cli-migrator/lib/ember-migrator.js:97:12)
    at Object.<anonymous> (/usr/local/lib/node_modules/ember-cli-migrator/bin/ember-cli-migrator:30:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

FYI the test pass just fine.

iterion commented 9 years ago

I just started seeing this as well. I was able to get it to run if I move all of my .hbs files out of the app dir prior to running the tool, so that might be a workaround for you for now.

fivetanley commented 9 years ago

I think I fixed this with https://github.com/fivetanley/ember-cli-migrator/commit/86e541c041606fc6364911eca92d88f6859b0573, can you both try again? It's released as 0.4.2

fivetanley commented 9 years ago

also @kiwiupover -d is actually for the ember-cli app-name now. This is whatever you would pass to ember new. So for example if your app was named blog you would pass -d blog. This is so ember-cli can get all the imports correctly. The documentation was wrong so I updated that to be less confusing.

kiwiupover commented 9 years ago

Thanks @fivetanley