From 190ec140670c81fc6f09582d9f2c63e4978c6ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E8=81=BF=E8=BD=A9?= <929003281@qq.com> Date: Tue, 18 Feb 2020 13:09:27 +0800 Subject: [PATCH 1/2] chore: fix typo and remove useless function --- 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..075a980f1 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) { From e4967d43b3b9f1d13bb6c71037243e5d9da012f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E8=81=BF=E8=BD=A9?= <929003281@qq.com> Date: Tue, 18 Feb 2020 13:22:10 +0800 Subject: [PATCH 2/2] add semi --- src/set-tokens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/set-tokens.ts b/src/set-tokens.ts index 075a980f1..f6fd5fb5b 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -7,7 +7,7 @@ import fs from 'fs'; const cpSpawnSync = require('child_process').spawnSync; const cpexec = require('child_process').execFileSync; import {Inputs} from './interfaces'; -import {getHomeDir} from './utils' +import {getHomeDir} from './utils'; export function setPublishRepo(insp: Inputs): string { if (insp.ExternalRepository) {