Commit 253bfd7
authored
Check for folder in
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 ruby@b722631
Since then, `sync_lib` is unused, delete itsync_default_gems (ruby#15933)1 parent fd7bf51 commit 253bfd7
1 file changed
+4
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
798 | 802 | | |
799 | 803 | | |
800 | 804 | | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | 805 | | |
822 | 806 | | |
823 | 807 | | |
| |||
0 commit comments