refactor: fix typo and remove useless function (#107)

This commit is contained in:
wu-yu-xuan 2020-02-18 13:30:50 +08:00 committed by GitHub
parent 60c31d23a8
commit 55a68e34ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 15 deletions

View File

@ -16,7 +16,7 @@ function showInputs(inps: Inputs): void {
core.info(`[INFO] AllowEmptyCommit: ${inps.AllowEmptyCommit}`);
core.info(`[INFO] KeepFiles: ${inps.KeepFiles}`);
core.info(`[INFO] ForceOrphan: ${inps.ForceOrphan}`);
core.info(`[INFO] UserEmail: ${inps.UserEmail}`);
core.info(`[INFO] UserName: ${inps.UserName}`);
core.info(`[INFO] UserEmail: ${inps.UserEmail}`);
core.info(`[INFO] CommitMessage: ${inps.CommitMessage}`);
core.info(`[INFO] TagName: ${inps.TagName}`);

View File

@ -7,20 +7,7 @@ import fs from 'fs';
const cpSpawnSync = require('child_process').spawnSync;
const cpexec = require('child_process').execFileSync;
import {Inputs} from './interfaces';
export function getHomeDir(): string {
let homedir = '';
if (process.platform === 'win32') {
homedir = process.env['USERPROFILE'] || 'C:\\';
} else {
homedir = `${process.env.HOME}`;
}
core.debug(`homeDir: ${homedir}`);
return homedir;
}
import {getHomeDir} from './utils';
export function setPublishRepo(insp: Inputs): string {
if (insp.ExternalRepository) {