mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
It was not clear to me that you have to do anything for this command to work.
Previous versions (for example on the 3.4 branch) had this check
but it got lost along the way.
Without this when the folder doesn't exist, you get this error (after it deleted all the files):
```
$ ./tool/sync_default_gems.rb syntax_suggest
Sync ruby/syntax_suggest
./tool/sync_default_gems.rb:464:in 'SyncDefaultGems.check_prerelease_version': undefined method 'version' for nil (NoMethodError)
puts "#{gem}-#{spec.version} is not latest version of rubygems.org" if spec.version.to_s != latest_version
^^^^^^^^
from ./tool/sync_default_gems.rb:436:in 'SyncDefaultGems.sync_default_gems'
from ./tool/sync_default_gems.rb:942:in '<module:SyncDefaultGems>'
from ./tool/sync_default_gems.rb:10:in '<main>'
```
Now you get
```
$ ./tool/sync_default_gems.rb syntax_suggest
Sync ruby/syntax_suggest
Expected '../ruby/syntax_suggest' (/home/earlopain/Documents/ruby/syntax_suggest) to be a directory, but it didn't exist.
```
This was changed in b722631b48
Since then, `sync_lib` is unused, delete it