Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15858] CLI: Error while cleaning a project after build

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsandroidlib, cb-tooling
ReporterChris Barber
AssigneeChris Barber
Created2013-12-02T20:40:58.000+0000
Updated2016-09-02T06:00:35.000+0000

Description

Comments

  1. Fokke Zandbergen 2015-08-26

  2. Fokke Zandbergen 2015-08-26

    Why not just rimraf the whole build folder?
  3. Chris Barber 2015-08-26

    [~fokkezb] How is rimraf any different than a wrench.rmdirSyncRecursive()? https://github.com/appcelerator/titanium_mobile/blob/master/cli/commands/clean.js#L126-L130
  4. Fokke Zandbergen 2015-08-26

    Well, apparently Isaacs handles this case: https://github.com/isaacs/rimraf/blob/master/rimraf.js#L321
  5. Chris Barber 2015-08-26

    Maybe we should just exec('rm -rf /path/to/build/dir').
  6. Fokke Zandbergen 2015-08-26

    I think rimraf handles cross-platform compat better.
  7. Chris Barber 2015-08-26

    Until I hear a solid argument to move away from wrench.rmdirSyncRecursive() and proof that rimraf actually solves this problem, I'm not going to touch anything which puts this ticket in jeopardy of being resolved won't fix. My guess is rimraf would have the same problem.
  8. Fokke Zandbergen 2015-08-26

    As always, it seems you are right and even rm -rf would fail: https://github.com/oortcloud/meteorite/issues/235#issuecomment-32572271
  9. Fokke Zandbergen 2015-08-26

    Haha, ugly workaround: https://github.com/oortcloud/meteorite/pull/237/files
  10. Chris Barber 2015-08-26

    I'm sure it's just a timing thing. I bet if we did a retry with a 250ms pause, it would probably work, but then we would have to make it async instead of sync, which is fine.

JSON Source