venmo / synx

A command-line tool that reorganizes your Xcode project folder to match your Xcode groups
MIT License
6.08k stars 274 forks source link

running synx with --no-color fails and deletes all the files #135

Open ladislas opened 7 years ago

ladislas commented 7 years ago

hi there!

I just tried to use the --no-color flag to use the output for my dev team.

I go the following error and all the files were deleted (the second part was fixed with git reset but still a bit scary).

Am I doing something wrong?

→ synx --no-sort-by-name --no-color LekaApp.xcodeproj | pbcopy
/Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/tabber.rb:35:in `puts': undefined method `uncolorize' for #<Pathname:ActivityManager.swift.orig> (NoMethodError)
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:109:in `handle_unused_file'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:89:in `handle_unused_entry'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:59:in `block in move_entries_not_in_xcodeproj'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:57:in `each'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:57:in `move_entries_not_in_xcodeproj'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:62:in `each'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/xcodeproj_ext/project/object/pbx_group.rb:62:in `move_entries_not_in_xcodeproj'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/project.rb:23:in `each'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/lib/synx/project.rb:23:in `sync'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/bin/synx:25:in `execute'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/clamp-0.6.5/lib/clamp.rb:6:in `Clamp'
    from /Users/ladislas/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/synx-0.2.1/bin/synx:6:in `<top (required)>'
    from /Users/ladislas/.rbenv/versions/2.4.0/bin/synx:22:in `load'
    from /Users/ladislas/.rbenv/versions/2.4.0/bin/synx:22:in `<main>'