Skip to content

Commit

Permalink
fix(cli): homedir misconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
saasy-sharath committed Aug 5, 2024
1 parent e57af27 commit fd3d32c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/routes/asdf/_layout.tool.$toolName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Row = forwardRef<
</div>
<div className="flex gap-2">
{v.installed && (
<EasyTooltip tooltip={inUse && 'Switch to this version'}>
<EasyTooltip tooltip={!inUse && 'Switch to this version'}>
<Button
disabled={inUse || changeVersionMutation.isPending}
variant="ghost"
Expand Down

0 comments on commit fd3d32c

Please sign in to comment.