mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-21 01:53:16 +08:00
16 lines
301 B
TypeScript
16 lines
301 B
TypeScript
import * as core from '@actions/core';
|
|
|
|
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;
|
|
}
|