Sha256: 2f57ca445a42a0df7b967cfd2436fd800b10342087c202ff3f004ce7334c092f
Contents?: true
Size: 424 Bytes
Versions: 1
Compression:
Stored size: 424 Bytes
Contents
#!/usr/bin/env ruby require 'git_handler' config = GitHandler::Configuration.new begin session = GitHandler::Session.new(config) session.execute(ARGV.dup, ENV.dup.to_hash) do |req| unless req.read STDERR.puts "Readonly" exit 1 end end # Now, replace current process with git shell exec('git-shell', '-c', req.command) rescue Exception => ex STDERR.puts "Error: #{ex.message}" exit(1) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git_handler-0.2.2 | examples/readonly.rb |