template-dir/hooks/pre-commit in overcommit-0.14.1 vs template-dir/hooks/pre-commit in overcommit-0.15.0

- old
+ new

@@ -53,11 +53,11 @@ logger = Overcommit::Logger.new(STDOUT) # Ensure master hook is up-to-date installer = Overcommit::Installer.new(logger) if installer.run(Overcommit::Utils.repo_root, :action => :update) - exec $0 # Execute the updated hook + exec($0, *ARGV) # Execute the updated hook with all original arguments end config = Overcommit::ConfigurationLoader.load_repo_config context = Overcommit::HookContext.create(hook_type, config, ARGV, STDIN) @@ -76,9 +76,12 @@ exit 78 # EX_CONFIG rescue Overcommit::Exceptions::HookContextLoadError => error puts error puts 'Are you running an old version of Overcommit?' exit 69 # EX_UNAVAILABLE +rescue Overcommit::Exceptions::HookSetupFailed => error + puts error + exit 74 # EX_IOERR rescue Overcommit::Exceptions::HookCancelled puts 'You cancelled the hook run' exit 1 rescue Overcommit::Exceptions::InvalidGitRepo => error puts error