mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Move all bundles in ~/.atom/bundles to packages if that dir exists
This fixes a bug where we always moved the `bundles` dir inside the `packages` dir if it existed, which caused a load error trying to load the `bundles` dir as if it were a package.
This commit is contained in:
6
Rakefile
6
Rakefile
@@ -62,9 +62,9 @@ desc "Creates .atom file if non exists"
|
||||
task "create-dot-atom" do
|
||||
# Migration: If there is still a bundle path, rename it to packages
|
||||
if File.exists?(DOT_ATOM_PATH) and File.exists?(File.join(DOT_ATOM_PATH, "bundles"))
|
||||
if File.join(DOT_ATOM_PATH, "packages")
|
||||
`rm #{File.join(DOT_ATOM_PATH, "bundles")}`
|
||||
$stderr.puts "WARNING: removed ~/.atom/bundles"
|
||||
if File.exists?(File.join(DOT_ATOM_PATH, "packages"))
|
||||
`mv #{File.join(DOT_ATOM_PATH, "bundles", "*")} #{File.join(DOT_ATOM_PATH, "packages")}`
|
||||
$stderr.puts "WARNING: Bundles from ~/.atom/bundles were moved to ~/.atom/packages"
|
||||
else
|
||||
`mv #{File.join(DOT_ATOM_PATH, "bundles")} #{File.join(DOT_ATOM_PATH, "packages")}`
|
||||
$stderr.puts "WARNING: ~/.atom/bundles was moved to ~/.atom/packages"
|
||||
|
||||
Reference in New Issue
Block a user