From fd3d32cd6e7a9a5c8c66e0ff503be2685c1b8ec4 Mon Sep 17 00:00:00 2001 From: Sharath Date: Mon, 5 Aug 2024 12:55:28 +0530 Subject: [PATCH] fix(cli): homedir misconfig --- src/api/cli.ts | 4 ++-- src/routes/asdf/_layout.tool.$toolName.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/cli.ts b/src/api/cli.ts index 20fbb10..c976465 100644 --- a/src/api/cli.ts +++ b/src/api/cli.ts @@ -80,7 +80,7 @@ function parseCurrentRuntimeList(input: string, homeDir?: string): CurrentRuntim const isVersionUnset = version === '______'; let toolVersionLocation = isVersionUnset ? null : _tvLoc.join(' '); if (homeDir && toolVersionLocation?.includes(homeDir)) - toolVersionLocation = toolVersionLocation.replace(homeDir, '~/'); + toolVersionLocation = toolVersionLocation.replace(homeDir, '~'); return { name, version: isVersionUnset ? null : version, @@ -114,7 +114,7 @@ function parsePluginList(input: string, installed?: true): Plugin[] { function parsePath(_input: string, homeDir?: string): string[] { let input = _input; - if (homeDir && input.startsWith(homeDir)) input = input.replace(homeDir, '~/'); + if (homeDir && input.startsWith(homeDir)) input = input.replace(homeDir, '~'); return input .split('/') .map((p) => p.trim()) diff --git a/src/routes/asdf/_layout.tool.$toolName.tsx b/src/routes/asdf/_layout.tool.$toolName.tsx index fddbc01..063ba5c 100644 --- a/src/routes/asdf/_layout.tool.$toolName.tsx +++ b/src/routes/asdf/_layout.tool.$toolName.tsx @@ -59,7 +59,7 @@ const Row = forwardRef<
{v.installed && ( - +