diff options
| -rw-r--r-- | Library/Homebrew/cmd/command.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/commands.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/help.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_commands.rb | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/Library/Homebrew/cmd/command.rb b/Library/Homebrew/cmd/command.rb index 8c8a8c699..bab0257c8 100644 --- a/Library/Homebrew/cmd/command.rb +++ b/Library/Homebrew/cmd/command.rb @@ -21,11 +21,7 @@ module Homebrew def internal_command_path(cmd) extensions = %w[rb sh] paths = extensions.map { |ext| HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.#{ext}" } - - if ARGV.homebrew_developer? - paths += extensions.map { |ext| HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.#{ext}" } - end - + paths += extensions.map { |ext| HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.#{ext}" } paths.find { |p| p.file? } end end diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index 52705c58a..bb1e6fe4d 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -8,7 +8,7 @@ module Homebrew def commands if ARGV.include? "--quiet" cmds = internal_commands + external_commands - cmds += internal_development_commands if ARGV.homebrew_developer? + cmds += internal_development_commands cmds += HOMEBREW_INTERNAL_COMMAND_ALIASES.keys if ARGV.include? "--include-aliases" puts_columns cmds.sort else diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb index ac5fce5b7..eae08395d 100644 --- a/Library/Homebrew/cmd/help.rb +++ b/Library/Homebrew/cmd/help.rb @@ -72,11 +72,11 @@ module Homebrew def command_path(cmd) if File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh") HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh" - elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh") + elsif File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh") HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh" elsif File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb") HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb" - elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb") + elsif File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb") HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb" end end diff --git a/Library/Homebrew/test/test_commands.rb b/Library/Homebrew/test/test_commands.rb index b6dd5c2be..4a24107a9 100644 --- a/Library/Homebrew/test/test_commands.rb +++ b/Library/Homebrew/test/test_commands.rb @@ -70,10 +70,6 @@ class CommandsTests < Homebrew::TestCase end def test_internal_dev_command_path - ARGV.stubs(:homebrew_developer?).returns false - assert_nil Homebrew.send(:internal_command_path, "rbdevcmd") - - ARGV.stubs(:homebrew_developer?).returns true assert_equal HOMEBREW_LIBRARY_PATH/"dev-cmd/rbdevcmd.rb", Homebrew.send(:internal_command_path, "rbdevcmd") assert_equal HOMEBREW_LIBRARY_PATH/"dev-cmd/shdevcmd.sh", |
