Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leap_cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
leap
leap_cli
Commits
5e266e1f
There was a problem fetching the pipeline summary.
Commit
5e266e1f
authored
Sep 1, 2016
by
elijah
Browse files
Options
Downloads
Patches
Plain Diff
print friendly message if leap_platform is too old (closes #8423)
parent
cd809a6b
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/leap_cli/leapfile.rb
+13
-2
13 additions, 2 deletions
lib/leap_cli/leapfile.rb
lib/leap_cli/util.rb
+1
-1
1 addition, 1 deletion
lib/leap_cli/util.rb
with
14 additions
and
3 deletions
lib/leap_cli/leapfile.rb
+
13
−
2
View file @
5e266e1f
...
@@ -63,8 +63,19 @@ module LeapCli
...
@@ -63,8 +63,19 @@ module LeapCli
unless
File
.
exist?
(
platform_definition
)
unless
File
.
exist?
(
platform_definition
)
Util
.
bail!
"ERROR: The file `
#{
platform_file
}
` does not exist. Please check the value of `@platform_directory_path` in `Leapfile` or `~/.leaprc`."
Util
.
bail!
"ERROR: The file `
#{
platform_file
}
` does not exist. Please check the value of `@platform_directory_path` in `Leapfile` or `~/.leaprc`."
end
end
begin
require
platform_class
require
platform_class
require
platform_definition
require
platform_definition
rescue
LoadError
Util
.
log
"The leap_platform at
#{
platform_directory_path
}
is not compatible with this version of leap_cli"
Util
.
log
"You can either:"
do
Util
.
log
"Upgrade leap_platform to version "
+
LeapCli
::
COMPATIBLE_PLATFORM_VERSION
.
first
Util
.
log
"Or, downgrade leap_cli to version 1.8"
end
Util
.
bail!
rescue
StandardError
=>
exc
Util
.
bail!
exc
.
to_s
end
begin
begin
Leap
::
Platform
.
validate!
(
LeapCli
::
VERSION
,
LeapCli
::
COMPATIBLE_PLATFORM_VERSION
,
self
)
Leap
::
Platform
.
validate!
(
LeapCli
::
VERSION
,
LeapCli
::
COMPATIBLE_PLATFORM_VERSION
,
self
)
rescue
StandardError
=>
exc
rescue
StandardError
=>
exc
...
...
This diff is collapsed.
Click to expand it.
lib/leap_cli/util.rb
+
1
−
1
View file @
5e266e1f
...
@@ -45,7 +45,7 @@ module LeapCli
...
@@ -45,7 +45,7 @@ module LeapCli
if
message
.
any?
if
message
.
any?
log
(
0
,
*
message
,
&
block
)
log
(
0
,
*
message
,
&
block
)
else
else
log
(
0
,
:bailing
,
"out"
,
&
block
)
log
(
0
,
:bailing
,
"out"
,
:color
=>
:red
,
:style
=>
:bold
,
&
block
)
end
end
raise
SystemExit
.
new
(
exit_status
||
1
)
raise
SystemExit
.
new
(
exit_status
||
1
)
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment