rtx -> mise

This commit is contained in:
Jeff Dickey 2024-01-02 16:16:49 -06:00
parent b2bd646a01
commit 2c307d8ed6
No known key found for this signature in database
GPG key ID: 584DADE86724B407
10 changed files with 118 additions and 118 deletions

View file

@ -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')
}