Display libexecdir

This commit is contained in:
CrazyMax 2020-05-04 16:40:21 +02:00
parent c263b24136
commit cb88a0fce7
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
3 changed files with 20 additions and 8 deletions

10
dist/index.js generated vendored
View file

@ -1026,9 +1026,10 @@ function run() {
const version = yield gpg.getVersion(); const version = yield gpg.getVersion();
const dirs = yield gpg.getDirs(); const dirs = yield gpg.getDirs();
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`); 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(`Libdir : ${dirs.libdir}`);
core.info(`Libexecdir : ${dirs.libexecdir}`);
core.info(`Datadir : ${dirs.datadir}`);
core.info(`Homedir : ${dirs.homedir}`);
core.info('🔮 Checking signing key...'); core.info('🔮 Checking signing key...');
const privateKey = yield openpgp.readPrivateKey(process.env.SIGNING_KEY); const privateKey = yield openpgp.readPrivateKey(process.env.SIGNING_KEY);
core.debug(`Fingerprint : ${privateKey.fingerprint}`); core.debug(`Fingerprint : ${privateKey.fingerprint}`);
@ -1143,12 +1144,16 @@ exports.getDirs = () => __awaiter(void 0, void 0, void 0, function* () {
throw new Error(res.stderr); throw new Error(res.stderr);
} }
let libdir = ''; let libdir = '';
let libexecdir = '';
let datadir = ''; let datadir = '';
let homedir = ''; let homedir = '';
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) { for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
if (line.startsWith('libdir:')) { if (line.startsWith('libdir:')) {
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim(); 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:')) { else if (line.startsWith('datadir:')) {
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim(); datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
} }
@ -1158,6 +1163,7 @@ exports.getDirs = () => __awaiter(void 0, void 0, void 0, function* () {
} }
return { return {
libdir: path.normalize(libdir), libdir: path.normalize(libdir),
libexecdir: path.normalize(libexecdir),
datadir: path.normalize(datadir), datadir: path.normalize(datadir),
homedir: path.normalize(homedir) homedir: path.normalize(homedir)
}; };

View file

@ -14,6 +14,7 @@ export interface Version {
export interface Dirs { export interface Dirs {
libdir: string; libdir: string;
libexecdir: string;
datadir: string; datadir: string;
homedir: string; homedir: string;
} }
@ -51,12 +52,15 @@ export const getDirs = async (): Promise<Dirs> => {
} }
let libdir: string = ''; let libdir: string = '';
let libexecdir: string = '';
let datadir: string = ''; let datadir: string = '';
let homedir: string = ''; let homedir: string = '';
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) { for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
if (line.startsWith('libdir:')) { if (line.startsWith('libdir:')) {
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim(); 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:')) { } else if (line.startsWith('datadir:')) {
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim(); datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
} else if (line.startsWith('homedir:')) { } else if (line.startsWith('homedir:')) {
@ -66,6 +70,7 @@ export const getDirs = async (): Promise<Dirs> => {
return { return {
libdir: path.normalize(libdir), libdir: path.normalize(libdir),
libexecdir: path.normalize(libexecdir),
datadir: path.normalize(datadir), datadir: path.normalize(datadir),
homedir: path.normalize(homedir) homedir: path.normalize(homedir)
}; };

View file

@ -14,9 +14,10 @@ async function run(): Promise<void> {
const version = await gpg.getVersion(); const version = await gpg.getVersion();
const dirs = await gpg.getDirs(); const dirs = await gpg.getDirs();
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`); 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(`Libdir : ${dirs.libdir}`);
core.info(`Libexecdir : ${dirs.libexecdir}`);
core.info(`Datadir : ${dirs.datadir}`);
core.info(`Homedir : ${dirs.homedir}`);
core.info('🔮 Checking signing key...'); core.info('🔮 Checking signing key...');
const privateKey = await openpgp.readPrivateKey(process.env.SIGNING_KEY); const privateKey = await openpgp.readPrivateKey(process.env.SIGNING_KEY);