From 175682631c2e0c5842658097d4b5010b3309e854 Mon Sep 17 00:00:00 2001 From: shimataro Date: Mon, 8 Feb 2021 23:11:39 +0900 Subject: [PATCH] update dist file --- lib/index.js | 4 ++++ src/main.ts | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 0fe2f6d..3a2345a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -485,6 +485,10 @@ function getHomeDirectory() { if (home === undefined) { throw Error(`${homeEnv} is not defined`); } + if (home === "/github/home") { + // Docker container + return "/root"; + } return home; } /** diff --git a/src/main.ts b/src/main.ts index 3f4ad22..b39d10c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -63,7 +63,7 @@ function main(): void fs.writeFileSync(fileName, file.contents, file.options); } - console.log(`SSH key has been stored to ${dirName} successfully. / ${home}`); + console.log(`SSH key has been stored to ${dirName} successfully.`); } catch(err) { @@ -84,6 +84,12 @@ function getHomeDirectory(): string throw Error(`${homeEnv} is not defined`); } + if(home === "/github/home") + { + // Docker container + return "/root"; + } + return home; }