Skip to content
This repository was archived by the owner on Mar 31, 2022. It is now read-only.

Commit c4342f5

Browse files
author
David Varvel and Matt Royal
committed
Add the bin file's directory to the load path
As of ruby 1.9.2, the current directory of the invoked ruby file is no longer added to the load path. When we extracted classes from bin/git-pair into the lib directory, users of newer rubies started to see an error when running git-pair. The same behavior also affects git-pair-commit. This fix addresses the problem.
1 parent 48f48eb commit c4342f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/git-pair

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env ruby
2-
require 'yaml'
3-
require 'optparse'
2+
$LOAD_PATH.unshift(File.dirname(__FILE__)) # this is required when running from /usr/local/bin
43
require 'pivotal_git_scripts/git_pair'
54

65
PivotalGitScripts::GitPair.main(ARGV)

bin/git-pair-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
$LOAD_PATH.unshift(File.dirname(__FILE__)) # this is required when running from /usr/local/bin
23
require 'pivotal_git_scripts/git_pair'
34

45
PivotalGitScripts::GitPair.commit(ARGV)

0 commit comments

Comments
 (0)