#!/usr/bin/env ruby # frozen_string_literal: true require "shellwords" # Valid commands are: `get`, `store`, `erase`. We only want to let `get` # through, as the others mutate the credential store. if ARGV.include?("get") args = ARGV.map { |arg| Shellwords.escape(arg) }.join(" ") exec "git credential-store #{args}" end