summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-04-28 11:03:47 -0700
committerelijah <elijah@riseup.net>2015-04-28 11:03:47 -0700
commit59c931ae3c2c0b6783cecbba965179b5985d0b2b (patch)
treef1006d4020822fbecef6ac139d413320cfe8403e /lib
parent9a6b198873823d8deb6d405222a0eca28312ae0a (diff)
better platform version incompatibility message (closes #6855)
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/leapfile.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/leap_cli/leapfile.rb b/lib/leap_cli/leapfile.rb
index 1bb2fa0..c2bc10b 100644
--- a/lib/leap_cli/leapfile.rb
+++ b/lib/leap_cli/leapfile.rb
@@ -65,17 +65,13 @@ module LeapCli
Util.bail! "ERROR: The file `#{platform_file}` does not exist. Please check the value of `@platform_directory_path` in `Leapfile` or `~/.leaprc`."
end
require "#{@platform_directory_path}/platform.rb"
- if !Leap::Platform.compatible_with_cli?(LeapCli::VERSION)
+ if !Leap::Platform.compatible_with_cli?(LeapCli::VERSION) ||
+ !Leap::Platform.version_in_range?(LeapCli::COMPATIBLE_PLATFORM_VERSION)
Util.bail! "This leap command (v#{LeapCli::VERSION}) " +
- "is not compatible with the platform #{@platform_directory_path} (v#{Leap::Platform.version}). " +
- "You need leap command #{Leap::Platform.compatible_cli.first} to #{Leap::Platform.compatible_cli.last}."
+ "is not compatible with the platform #{@platform_directory_path} (v#{Leap::Platform.version}).\n " +
+ "You need either leap command #{Leap::Platform.compatible_cli.first} to #{Leap::Platform.compatible_cli.last} or " +
+ "platform version #{LeapCli::COMPATIBLE_PLATFORM_VERSION.first} to #{LeapCli::COMPATIBLE_PLATFORM_VERSION.last}"
end
- if !Leap::Platform.version_in_range?(LeapCli::COMPATIBLE_PLATFORM_VERSION)
- Util.bail! "This leap command (v#{LeapCli::VERSION}) " +
- "is not compatible with the platform #{@platform_directory_path} (v#{Leap::Platform.version}). " +
- "You need platform version #{LeapCli::COMPATIBLE_PLATFORM_VERSION.first} to #{LeapCli::COMPATIBLE_PLATFORM_VERSION.last}."
- end
-
unless @allow_production_deploy.nil?
Util::log 0, :warning, "in Leapfile: @allow_production_deploy is no longer supported."
end