diff options
Diffstat (limited to 'lib/leap_cli/commands/pre.rb')
-rw-r--r-- | lib/leap_cli/commands/pre.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb index 03355bb..cb92fe2 100644 --- a/lib/leap_cli/commands/pre.rb +++ b/lib/leap_cli/commands/pre.rb @@ -47,6 +47,13 @@ module LeapCli bail! { log :missing, "platform directory '#{Path.platform}'" } end + if LeapCli.leapfile.platform_branch && LeapCli::Util.is_git_directory?(Path.platform) + branch = LeapCli::Util.current_git_branch(Path.platform) + if branch != LeapCli.leapfile.platform_branch + bail! "Wrong branch for #{Path.platform}. Was '#{branch}', should be '#{LeapCli.leapfile.platform_branch}'. Edit Leapfile to disable this check." + end + end + # # set log file # |