File tree Expand file tree Collapse file tree 5 files changed +2
-25
lines changed
CodeEdit/Features/LSP/Registry/PackageManagers Expand file tree Collapse file tree 5 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ final class CargoPackageManager: PackageManagerProtocol {
3535 }
3636
3737 let packagePath = installationDirectory. appending ( path: source. entryName)
38- print ( " Installing \( source. entryName) @ \( source. version) in \( packagePath. path) " )
39-
4038 try await initialize ( in: packagePath)
4139
4240 do {
@@ -63,9 +61,7 @@ final class CargoPackageManager: PackageManagerProtocol {
6361 }
6462
6563 _ = try await executeInDirectory ( in: packagePath. path, cargoArgs)
66- print ( " Successfully installed \( source. entryName) @ \( source. version) " )
6764 } catch {
68- print ( " Installation failed: \( error) " )
6965 throw error
7066 }
7167 }
@@ -82,7 +78,6 @@ final class CargoPackageManager: PackageManagerProtocol {
8278 }
8379 return output. starts ( with: " cargo " )
8480 } catch {
85- print ( " Cargo version check failed: \( error) " )
8681 return false
8782 }
8883 }
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ final class GithubPackageManager: PackageManagerProtocol {
5959 }
6060 return output. contains ( " git version " )
6161 } catch {
62- print ( " Git version check failed: \( error) " )
6362 return false
6463 }
6564 }
@@ -73,7 +72,7 @@ final class GithubPackageManager: PackageManagerProtocol {
7372 if !FileManager. default. fileExists ( atPath: packagePath. path) {
7473 throw RegistryManagerError . downloadFailed (
7574 url: url,
76- error: NSError ( domain: " Coould not download package" , code: - 1 )
75+ error: NSError ( domain: " Could not download package" , code: - 1 )
7776 )
7877 }
7978
@@ -89,7 +88,6 @@ final class GithubPackageManager: PackageManagerProtocol {
8988 let repoPath = installPath. appending ( path: source. pkgName, directoryHint: . isDirectory)
9089 _ = try await executeInDirectory ( in: repoPath. path, [ command] )
9190 } catch {
92- print ( " Failed to build from source: \( error) " )
9391 throw PackageManagerError . installationFailed ( " Source build failed. " )
9492 }
9593 }
Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ final class GolangPackageManager: PackageManagerProtocol {
4343 }
4444
4545 let packagePath = installationDirectory. appending ( path: source. entryName)
46- print ( " Installing Go package \( source. entryName) @ \( source. version) in \( packagePath. path) " )
47-
4846 try await initialize ( in: packagePath)
4947
5048 do {
@@ -78,10 +76,7 @@ final class GolangPackageManager: PackageManagerProtocol {
7876 let execPath = packagePath. appending ( path: " bin " ) . appending ( path: binaryName) . path
7977 _ = try await runCommand ( " chmod +x \" \( execPath) \" " )
8078 }
81-
82- print ( " Successfully installed \( source. entryName) @ \( source. version) " )
8379 } catch {
84- print ( " Installation failed: \( error) " )
8580 try ? cleanupFailedInstallation ( packagePath: packagePath)
8681 throw PackageManagerError . installationFailed ( error. localizedDescription)
8782 }
@@ -108,7 +103,6 @@ final class GolangPackageManager: PackageManagerProtocol {
108103 }
109104 return output. range ( of: versionPattern, options: . regularExpression) != nil
110105 } catch {
111- print ( " Go version check failed: \( error) " )
112106 return false
113107 }
114108 }
Original file line number Diff line number Diff line change @@ -56,8 +56,6 @@ final class NPMPackageManager: PackageManagerProtocol {
5656 }
5757
5858 let packagePath = installationDirectory. appending ( path: source. entryName)
59- print ( " Installing \( source. entryName) @ \( source. version) in \( packagePath. path) " )
60-
6159 try await initialize ( in: packagePath)
6260
6361 do {
@@ -73,10 +71,7 @@ final class NPMPackageManager: PackageManagerProtocol {
7371
7472 _ = try await executeInDirectory ( in: packagePath. path, installArgs)
7573 try verifyInstallation ( folderName: source. entryName, package : source. pkgName, version: source. version)
76-
77- print ( " Successfully installed \( source. entryName) @ \( source. version) " )
7874 } catch {
79- print ( " Installation failed: \( error) " )
8075 let nodeModulesPath = packagePath. appending ( path: " node_modules " ) . path
8176 try ? FileManager . default. removeItem ( atPath: nodeModulesPath)
8277 throw error
Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ final class PipPackageManager: PackageManagerProtocol {
4343 }
4444
4545 let packagePath = installationDirectory. appending ( path: source. entryName)
46- print ( " Installing \( source. entryName) @ \( source. version) in \( packagePath. path) " )
47-
4846 try await initialize ( in: packagePath)
4947
5048 do {
@@ -58,7 +56,7 @@ final class PipPackageManager: PackageManagerProtocol {
5856 }
5957
6058 let extras = source. options [ " extra " ]
61- if let extras = extras {
59+ if let extras {
6260 if let lastIndex = installArgs. indices. last {
6361 installArgs [ lastIndex] += " [ \( extras) ] "
6462 }
@@ -67,10 +65,7 @@ final class PipPackageManager: PackageManagerProtocol {
6765 _ = try await executeInDirectory ( in: packagePath. path, installArgs)
6866 try await updateRequirements ( packagePath: packagePath)
6967 try await verifyInstallation ( packagePath: packagePath, package : source. pkgName)
70-
71- print ( " Successfully installed \( source. entryName) @ \( source. version) " )
7268 } catch {
73- print ( " Installation failed: \( error) " )
7469 throw error
7570 }
7671 }
You can’t perform that action at this time.
0 commit comments