From ebb46eab94b3d33c48cdd3273125c8ea00bc68bd Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Tue, 12 May 2020 01:26:52 -0700 Subject: [PATCH] forgot to build and lint --- dist/index.js | 5 +++-- src/auth.ts | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index a6afd712..a19f106b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13208,6 +13208,7 @@ const util = __importStar(__webpack_require__(322)); const xmlbuilder2_1 = __webpack_require__(255); exports.M2_DIR = '.m2'; exports.TEMP_DIR = util.getTempDir(); +exports.GPG_HOME_DIR = path.join(exports.TEMP_DIR, '.gnupg'); exports.SETTINGS_FILE = 'settings.xml'; exports.PRIVATE_KEY_FILE = 'private-key.asc'; exports.DEFAULT_ID = 'github'; @@ -13263,7 +13264,7 @@ function generate(id, username, password, gpgPassphrase = null) { activeByDefault: true }, properties: { - 'gpg.homedir': exports.TEMP_DIR + 'gpg.homedir': exports.GPG_HOME_DIR } } ] @@ -13296,7 +13297,7 @@ function remove(path) { function importGPG(gpgPrivateKey) { return __awaiter(this, void 0, void 0, function* () { yield write(exports.TEMP_DIR, exports.PRIVATE_KEY_FILE, gpgPrivateKey); - yield exec.exec('gpg', ['--import', '--batch', exports.PRIVATE_KEY_FILE], { + yield exec.exec('gpg', ['--homedir', exports.GPG_HOME_DIR, '--import', '--batch', exports.PRIVATE_KEY_FILE], { cwd: exports.TEMP_DIR }); yield remove(path.join(exports.TEMP_DIR, exports.PRIVATE_KEY_FILE)); diff --git a/src/auth.ts b/src/auth.ts index a7762a96..96051dd4 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -124,8 +124,12 @@ async function remove(path: string) { async function importGPG(gpgPrivateKey: string) { await write(TEMP_DIR, PRIVATE_KEY_FILE, gpgPrivateKey); - await exec.exec('gpg', ['--homedir', GPG_HOME_DIR, '--import', '--batch', PRIVATE_KEY_FILE], { - cwd: TEMP_DIR - }); + await exec.exec( + 'gpg', + ['--homedir', GPG_HOME_DIR, '--import', '--batch', PRIVATE_KEY_FILE], + { + cwd: TEMP_DIR + } + ); await remove(path.join(TEMP_DIR, PRIVATE_KEY_FILE)); }