@@ -5,17 +5,15 @@ import * as vscode from "vscode";
55
66import { VersionManager , ActivationResult } from "./versionManager" ;
77import { WorkspaceChannel } from "../workspaceChannel" ;
8+ import { pathToUri } from "../common" ;
89
910// A tool to manage multiple runtime versions with a single CLI tool
1011//
1112// Learn more: https://github.com/asdf-vm/asdf
1213export class Asdf extends VersionManager {
1314 private static getPossibleExecutablePaths ( ) : vscode . Uri [ ] {
1415 // These directories are where we can find the ASDF executable for v0.16 and above
15- return [
16- vscode . Uri . joinPath ( vscode . Uri . file ( "/" ) , "opt" , "homebrew" , "bin" ) ,
17- vscode . Uri . joinPath ( vscode . Uri . file ( "/" ) , "usr" , "local" , "bin" ) ,
18- ] ;
16+ return [ pathToUri ( "/" , "opt" , "homebrew" , "bin" ) , pathToUri ( "/" , "usr" , "local" , "bin" ) ] ;
1917 }
2018
2119 private static getPossibleScriptPaths ( ) : vscode . Uri [ ] {
@@ -28,10 +26,10 @@ export class Asdf extends VersionManager {
2826 // 3. Homebrew M series
2927 // 4. Homebrew Intel series
3028 return [
31- vscode . Uri . joinPath ( vscode . Uri . file ( os . homedir ( ) ) , ".asdf" , scriptName ) ,
32- vscode . Uri . joinPath ( vscode . Uri . file ( "/" ) , "opt" , "asdf-vm" , scriptName ) ,
33- vscode . Uri . joinPath ( vscode . Uri . file ( "/" ) , "opt" , "homebrew" , "opt" , "asdf" , "libexec" , scriptName ) ,
34- vscode . Uri . joinPath ( vscode . Uri . file ( "/" ) , "usr" , "local" , "opt" , "asdf" , "libexec" , scriptName ) ,
29+ pathToUri ( os . homedir ( ) , ".asdf" , scriptName ) ,
30+ pathToUri ( "/" , "opt" , "asdf-vm" , scriptName ) ,
31+ pathToUri ( "/" , "opt" , "homebrew" , "opt" , "asdf" , "libexec" , scriptName ) ,
32+ pathToUri ( "/" , "usr" , "local" , "opt" , "asdf" , "libexec" , scriptName ) ,
3533 ] ;
3634 }
3735
0 commit comments