From 55a68e34ca406d99b5b2a4549d7ade5eeb03d860 Mon Sep 17 00:00:00 2001 From: wu-yu-xuan <35450080+wu-yu-xuan@users.noreply.github.com> Date: Tue, 18 Feb 2020 13:30:50 +0800 Subject: [PATCH] refactor: fix typo and remove useless function (#107) --- src/get-inputs.ts | 2 +- src/set-tokens.ts | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/get-inputs.ts b/src/get-inputs.ts index 8b5e073e7..d45769abe 100644 --- a/src/get-inputs.ts +++ b/src/get-inputs.ts @@ -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}`); diff --git a/src/set-tokens.ts b/src/set-tokens.ts index 979603a0c..f6fd5fb5b 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -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) {