@@ -5,12 +5,12 @@ public struct GitHubCopilotInstallationManager {
55 private static var isInstalling = false
66
77 static var downloadURL : URL {
8- let commitHash = " 1358e8e45ecedc53daf971924a0541ddf6224faf "
8+ let commitHash = " a4a6d6b3f9e284e7f5c849619e06cd228cad8abd "
99 let link = " https://github.com/github/copilot.vim/archive/ \( commitHash) .zip "
1010 return URL ( string: link) !
1111 }
1212
13- static let latestSupportedVersion = " 1.8.4 "
13+ static let latestSupportedVersion = " 1.9.1 "
1414
1515 public init ( ) { }
1616
@@ -113,7 +113,7 @@ public struct GitHubCopilotInstallationManager {
113113 includingPropertiesForKeys: nil ,
114114 options: [ ]
115115 )
116-
116+
117117 defer {
118118 for url in contentURLs {
119119 try ? FileManager . default. removeItem ( at: url)
@@ -127,8 +127,18 @@ public struct GitHubCopilotInstallationManager {
127127 return
128128 }
129129
130- let lspURL = gitFolderURL. appendingPathComponent ( " copilot " )
131- let installationURL = urls. executableURL. appendingPathComponent ( " copilot " )
130+ let lspURL = gitFolderURL. appendingPathComponent ( " dist " )
131+ let copilotURL = urls. executableURL. appendingPathComponent ( " copilot " )
132+
133+ if !FileManager. default. fileExists ( atPath: copilotURL. path) {
134+ try FileManager . default. createDirectory (
135+ at: copilotURL,
136+ withIntermediateDirectories: true ,
137+ attributes: nil
138+ )
139+ }
140+
141+ let installationURL = copilotURL. appendingPathComponent ( " dist " )
132142 try FileManager . default. copyItem ( at: lspURL, to: installationURL)
133143
134144 // update permission 755
0 commit comments