-
-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make test helper script a file, for readability
- Loading branch information
1 parent
d88372a
commit 7296e5c
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import subprocess | ||
import sys | ||
|
||
import git | ||
|
||
|
||
_, working_dir, env_var_name = sys.argv | ||
|
||
# Importing git should be enough, but this really makes sure Git.execute is called. | ||
repo = git.Repo(working_dir) # Hold the reference. | ||
git.Git(repo.working_dir).execute(["git", "version"]) | ||
|
||
print(subprocess.check_output(["set", env_var_name], shell=True, text=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters