Skip to content

Commit 2bf2aed

Browse files
For rake dist, grab the submodule for whatever selector engine was specified, even if it’s the default.
This is the thing I forgot to do when I removed our repo’s copy of Sizzle. That version of Sizzle _did_ get used if you tried to `rake dist` but you didn’t have the Sizzle submodule initialized. Considering that we’d have fetched the submodule automatically anyway, it’s not clear how much of a victory this was for user-friendliness.
1 parent 126d63d commit 2bf2aed

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Rakefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,12 @@ EOF
160160

161161
def self.get_selector_engine(name)
162162
return if !name
163-
# If the submodule exists, we should use it, even if we're using the
164-
# default engine; the user might have fetched it manually, and thus would
165-
# want to build a distributable with the most recent version of that
166-
# engine.
163+
# If the submodule exists, we should use it.
167164
submodule_path = File.join(ROOT_DIR, "vendor", name)
168165
return submodule_path if File.exist?(File.join(submodule_path, "repository", ".git"))
169166
return submodule_path if name === "legacy_selector"
170167

171-
# If it doesn't exist, we should fetch it, _unless_ it's the default
172-
# engine. We've already got a known version of the default engine in our
173-
# load path.
174-
return if name == DEFAULT_SELECTOR_ENGINE
168+
# If it doesn't exist, we should fetch it.
175169
get_submodule('the required selector engine', "#{name}/repository")
176170
unless File.exist?(submodule_path)
177171
puts "The selector engine you required isn't available at vendor/#{name}.\n\n"

0 commit comments

Comments
 (0)