diff --git a/ern-core/package.json b/ern-core/package.json index 7e3ddbfba..085b0ffda 100644 --- a/ern-core/package.json +++ b/ern-core/package.json @@ -62,7 +62,7 @@ "react-native-cli": "^2.0.1", "semver": "^7.3.5", "shelljs": "^0.8.4", - "simple-git": "^2.38.1", + "simple-git": "^3.25.0", "tmp": "^0.2.1", "treeify": "^1.1.0", "tunnel": "^0.0.6", diff --git a/ern-core/src/gitCli.ts b/ern-core/src/gitCli.ts index 562d1367f..4ad64c36f 100644 --- a/ern-core/src/gitCli.ts +++ b/ern-core/src/gitCli.ts @@ -1,5 +1,14 @@ -import simpleGit = require('simple-git/promise'); +const simpleGit = require('simple-git'); export function gitCli(workingDir?: string) { - return simpleGit(workingDir); + let sGit = simpleGit(workingDir); + + if (process.env.ERN_GITHUB_TOKEN) { + sGit.addConfig( + 'http.extraheader', + `Authorization: Basic ${process.env.ERN_GITHUB_TOKEN}`, + ); + } + + return sGit; } diff --git a/yarn.lock b/yarn.lock index 6d0d14109..c8fff517d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2562,6 +2562,13 @@ debug@^3.1.0: dependencies: ms "^2.1.1" +debug@^4.3.5: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -6470,14 +6477,14 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af" integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== -simple-git@^2.38.1: - version "2.48.0" - resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-2.48.0.tgz#87c262dba8f84d7b96bb3a713e9e34701c1f6e3b" - integrity sha512-z4qtrRuaAFJS4PUd0g+xy7aN4y+RvEt/QTJpR184lhJguBA1S/LsVlvE/CM95RsYMOFJG3NGGDjqFCzKU19S/A== +simple-git@^3.25.0: + version "3.25.0" + resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.25.0.tgz#3666e76d6831f0583dc380645945b97e0ac4aab6" + integrity sha512-KIY5sBnzc4yEcJXW7Tdv4viEz8KyG+nU0hay+DWZasvdFOYKeUZ6Xc25LUHHjw0tinPT7O1eY6pzX7pRT1K8rw== dependencies: "@kwsites/file-exists" "^1.1.1" "@kwsites/promise-deferred" "^1.1.1" - debug "^4.3.2" + debug "^4.3.5" simple-plist@^0.2.1: version "0.2.1"