mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-12-26 04:52:08 -05:00
Display libexecdir
This commit is contained in:
parent
c263b24136
commit
cb88a0fce7
3 changed files with 20 additions and 8 deletions
14
dist/index.js
generated
vendored
14
dist/index.js
generated
vendored
|
@ -1025,10 +1025,11 @@ function run() {
|
|||
core.info('📣 GnuPG info');
|
||||
const version = yield gpg.getVersion();
|
||||
const dirs = yield gpg.getDirs();
|
||||
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
||||
core.info(`Homedir : ${dirs.homedir}`);
|
||||
core.info(`Datadir : ${dirs.datadir}`);
|
||||
core.info(`Libdir : ${dirs.libdir}`);
|
||||
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
||||
core.info(`Libdir : ${dirs.libdir}`);
|
||||
core.info(`Libexecdir : ${dirs.libexecdir}`);
|
||||
core.info(`Datadir : ${dirs.datadir}`);
|
||||
core.info(`Homedir : ${dirs.homedir}`);
|
||||
core.info('🔮 Checking signing key...');
|
||||
const privateKey = yield openpgp.readPrivateKey(process.env.SIGNING_KEY);
|
||||
core.debug(`Fingerprint : ${privateKey.fingerprint}`);
|
||||
|
@ -1143,12 +1144,16 @@ exports.getDirs = () => __awaiter(void 0, void 0, void 0, function* () {
|
|||
throw new Error(res.stderr);
|
||||
}
|
||||
let libdir = '';
|
||||
let libexecdir = '';
|
||||
let datadir = '';
|
||||
let homedir = '';
|
||||
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
|
||||
if (line.startsWith('libdir:')) {
|
||||
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim();
|
||||
}
|
||||
else if (line.startsWith('libexecdir:')) {
|
||||
libexecdir = line.substr('libexecdir:'.length).replace('%3a', ':').trim();
|
||||
}
|
||||
else if (line.startsWith('datadir:')) {
|
||||
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
|
||||
}
|
||||
|
@ -1158,6 +1163,7 @@ exports.getDirs = () => __awaiter(void 0, void 0, void 0, function* () {
|
|||
}
|
||||
return {
|
||||
libdir: path.normalize(libdir),
|
||||
libexecdir: path.normalize(libexecdir),
|
||||
datadir: path.normalize(datadir),
|
||||
homedir: path.normalize(homedir)
|
||||
};
|
||||
|
|
|
@ -14,6 +14,7 @@ export interface Version {
|
|||
|
||||
export interface Dirs {
|
||||
libdir: string;
|
||||
libexecdir: string;
|
||||
datadir: string;
|
||||
homedir: string;
|
||||
}
|
||||
|
@ -51,12 +52,15 @@ export const getDirs = async (): Promise<Dirs> => {
|
|||
}
|
||||
|
||||
let libdir: string = '';
|
||||
let libexecdir: string = '';
|
||||
let datadir: string = '';
|
||||
let homedir: string = '';
|
||||
|
||||
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
|
||||
if (line.startsWith('libdir:')) {
|
||||
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim();
|
||||
} else if (line.startsWith('libexecdir:')) {
|
||||
libexecdir = line.substr('libexecdir:'.length).replace('%3a', ':').trim();
|
||||
} else if (line.startsWith('datadir:')) {
|
||||
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
|
||||
} else if (line.startsWith('homedir:')) {
|
||||
|
@ -66,6 +70,7 @@ export const getDirs = async (): Promise<Dirs> => {
|
|||
|
||||
return {
|
||||
libdir: path.normalize(libdir),
|
||||
libexecdir: path.normalize(libexecdir),
|
||||
datadir: path.normalize(datadir),
|
||||
homedir: path.normalize(homedir)
|
||||
};
|
||||
|
|
|
@ -13,10 +13,11 @@ async function run(): Promise<void> {
|
|||
core.info('📣 GnuPG info');
|
||||
const version = await gpg.getVersion();
|
||||
const dirs = await gpg.getDirs();
|
||||
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
||||
core.info(`Homedir : ${dirs.homedir}`);
|
||||
core.info(`Datadir : ${dirs.datadir}`);
|
||||
core.info(`Libdir : ${dirs.libdir}`);
|
||||
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
||||
core.info(`Libdir : ${dirs.libdir}`);
|
||||
core.info(`Libexecdir : ${dirs.libexecdir}`);
|
||||
core.info(`Datadir : ${dirs.datadir}`);
|
||||
core.info(`Homedir : ${dirs.homedir}`);
|
||||
|
||||
core.info('🔮 Checking signing key...');
|
||||
const privateKey = await openpgp.readPrivateKey(process.env.SIGNING_KEY);
|
||||
|
|
Loading…
Reference in a new issue