mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-20 00:11:54 +00:00
rtx -> mise
This commit is contained in:
parent
b2bd646a01
commit
2c307d8ed6
10 changed files with 118 additions and 118 deletions
12
src/utils.ts
12
src/utils.ts
|
|
@ -2,13 +2,13 @@ import * as core from '@actions/core'
|
|||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
|
||||
export function rtxDir(): string {
|
||||
const dir = core.getState('RTX_DIR')
|
||||
export function miseDir(): string {
|
||||
const dir = core.getState('MISE_DIR')
|
||||
if (dir) return dir
|
||||
|
||||
const { RTX_DATA_DIR, XDG_DATA_HOME } = process.env
|
||||
if (RTX_DATA_DIR) return RTX_DATA_DIR
|
||||
if (XDG_DATA_HOME) return path.join(XDG_DATA_HOME, 'rtx')
|
||||
const { MISE_DATA_DIR, XDG_DATA_HOME } = process.env
|
||||
if (MISE_DATA_DIR) return MISE_DATA_DIR
|
||||
if (XDG_DATA_HOME) return path.join(XDG_DATA_HOME, 'mise')
|
||||
|
||||
return path.join(os.homedir(), '.local/share/rtx')
|
||||
return path.join(os.homedir(), '.local/share/mise')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue