Moved uncommitted changes message out of run_locally block

This commit is contained in:
Igor Alexandrov
2023-07-21 22:45:23 +04:00
parent 9c2a1dc7cd
commit ea941f33f9

View File

@@ -17,13 +17,13 @@ class Mrsk::Cli::Build < Mrsk::Cli::Base
verify_local_dependencies verify_local_dependencies
run_hook "pre-build" run_hook "pre-build"
if (uncommitted_changes = Mrsk::Utils.uncommitted_changes).present?
say "The following paths have uncommitted changes (check your .gitignore file):\n #{uncommitted_changes}", :yellow
end
run_locally do run_locally do
begin begin
MRSK.with_verbosity(:debug) do MRSK.with_verbosity(:debug) do
if (uncommitted_changes = Mrsk::Utils.uncommitted_changes).present?
say "The following paths have uncommitted changes (check your .gitignore file):\n #{uncommitted_changes}", :yellow
end
execute *MRSK.builder.push execute *MRSK.builder.push
end end
rescue SSHKit::Command::Failed => e rescue SSHKit::Command::Failed => e