@learning-with-court/cli 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/git.js +9 -1
- package/dist/git.js.map +1 -1
- package/package.json +1 -1
package/dist/git.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
+
/**
|
|
3
|
+
* Disable any user-configured credential helpers (e.g. the AWS CodeCommit
|
|
4
|
+
* helper, which hijacks GitHub auth on Macs with the AWS toolchain installed)
|
|
5
|
+
* for our operations. We pass our own short-lived token in the URL — git
|
|
6
|
+
* shouldn't ask any helper for credentials.
|
|
7
|
+
*/
|
|
8
|
+
const NEUTRAL_GIT_FLAGS = ['-c', 'credential.helper='];
|
|
2
9
|
export function git(args, opts = {}) {
|
|
3
|
-
const result = spawnSync('git', args, {
|
|
10
|
+
const result = spawnSync('git', [...NEUTRAL_GIT_FLAGS, ...args], {
|
|
4
11
|
cwd: opts.cwd,
|
|
5
12
|
encoding: 'utf-8',
|
|
6
13
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
14
|
+
env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
|
|
7
15
|
});
|
|
8
16
|
return {
|
|
9
17
|
status: result.status ?? 1,
|
package/dist/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,MAAM,UAAU,GAAG,CAAC,IAAc,EAAE,OAAyB,EAAE;IAC7D,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C;;;;;GAKG;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