Skip to content

Commit

Permalink
Fix lint erros
Browse files Browse the repository at this point in the history
  • Loading branch information
srcid committed Oct 13, 2024
1 parent 2dfd950 commit 80808c7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions vscode/src/ruby/asdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,21 @@ export class Asdf extends VersionManager {
const scriptName =
path.basename(vscode.env.shell) === "fish" ? "asdf.fish" : "asdf.sh";

if (process.env['ASDF_DIR']) {
if (process.env.ASDF_DIR) {
// Follow the ASDF_DIR if it was set up.
const possiblePath = vscode.Uri.joinPath(vscode.Uri.parse(process.env["ASDF_DIR"]), scriptName)

const possiblePath = vscode.Uri.joinPath(
vscode.Uri.parse(process.env.ASDF_DIR),
scriptName,
);

try {
await vscode.workspace.fs.stat(possiblePath);
return possiblePath;
} catch (error: any) {
// Continue looking
}
}

// Possible ASDF installation paths as described in https://asdf-vm.com/guide/getting-started.html#_3-install-asdf.
// In order, the methods of installation are:
// 1. Git
Expand Down

0 comments on commit 80808c7

Please sign in to comment.