load: pass context arguments to subprocesses (#724)
Summary: This fixes a bug where, if the `SOURCECRED_DIRECTORY` environment variable is set to `foo` but the `-d bar` flag is passed, then the repository registry will be written under `foo` but the plugin data will be loaded under `bar`. Test Plan: ``` $ rm -rf /tmp/good /tmp/bad $ SOURCECRED_DIRECTORY=/tmp/bad >/dev/null \ > node bin/sourcecred.js load sourcecred/example-github -d /tmp/good $ [ -d /tmp/bad ]; echo $? $ find /tmp/good /tmp/good /tmp/good/cache /tmp/good/cache/sourcecred /tmp/good/cache/sourcecred/example-github /tmp/good/cache/sourcecred/example-github/github /tmp/good/cache/sourcecred/example-github/git /tmp/good/repositoryRegistry.json /tmp/good/data /tmp/good/data/sourcecred /tmp/good/data/sourcecred/example-github /tmp/good/data/sourcecred/example-github/github /tmp/good/data/sourcecred/example-github/github/view.json /tmp/good/data/sourcecred/example-github/git /tmp/good/data/sourcecred/example-github/git/graph.json ``` wchargin-branch: load-pass-context
This commit is contained in:
parent
c8a4940d3f
commit
e3eb779a92
|
@ -131,6 +131,10 @@ function loadDefaultPlugins({
|
|||
githubToken,
|
||||
"--output",
|
||||
repoToString(outputRepo),
|
||||
"-d",
|
||||
basedir,
|
||||
"--max-old-space-size",
|
||||
maxOldSpaceSize,
|
||||
],
|
||||
deps: [],
|
||||
})),
|
||||
|
|
Loading…
Reference in New Issue