Repository: vapor/vapor
File: Sources/Vapor/Provider/ProviderInstall.swift (Swift)

Code before:
        guard console.confirm("Would you like to continue?") else {
            console.warning("Install cancelled.")
            return
        }
        
        for (i, provider) in providers.enumerated() {
            let type = Swift.type(of: provider)
            console.info("[\(i + 1)/\(providers.count)]", newLine: false)
            console.print(" Installing \(type.repositoryName)")
            
            guard let root = type.providedDirectory else {
                console.error("Could not find directory for \(type)")
                continue
            }
            
            let publicDir = root + type.publicDir.finished(with: "/")
            let viewsDir = root + type.viewsDir.finished(with: "/")
            
            var dirty = false
            
            do {
                _ = try console.backgroundExecute(program: "/bin/sh", arguments: ["-c", "cp -rf \(publicDir)* \(self.publicDir)"])
                console.print("Copied public files")
                dirty = true
            } catch {
                console.print("Copy public files failed")
            }
            
            do {
                _ = try console.backgroundExecute(program: "/bin/sh", arguments: ["-c", "cp -rf \(viewsDir)* \(self.viewsDir)"])
                console.print("Copied resource files")
                dirty = true
            } catch {
                console.warning("Copy resource files failed")
            }
            
            if dirty {
                console.warning("Installed \(type.repositoryName)")
            } else {
                console.print("Nothing to install")
            }
        }
    }
}


Review comment (suggestion):
I'm not sure what's ideal here. But the `console.print` operations should be reviewed by @tanner0101 . The rest looks good to me 👍 

Code after:
        guard console.confirm("Would you like to continue?") else {
            console.warning("Install cancelled.")
            return
        }
        
        for (i, provider) in providers.enumerated() {
            let type = Swift.type(of: provider)
            console.info("[\(i + 1)/\(providers.count)]", newLine: false)
            console.print(" Installing \(type.repositoryName)")
            
            guard let root = type.providedDirectory else {
                console.error("Could not find directory for \(type)")
                continue
            }
            
            let publicDir = root + type.publicDir.finished(with: "/")
            let viewsDir = root + type.viewsDir.finished(with: "/")
            
            var dirty = false
            
            do {
                _ = try console.backgroundExecute(program: "/bin/sh", arguments: ["-c", "cp -rf \(publicDir)* \(self.publicDir)"])
                console.print("Copied public files")
                dirty = true
            } catch {
                console.warning("Copy public files failed")
            }
            
            do {
                _ = try console.backgroundExecute(program: "/bin/sh", arguments: ["-c", "cp -rf \(viewsDir)* \(self.viewsDir)"])
                console.print("Copied resource files")
                dirty = true
            } catch {
                console.warning("Copy resource files failed")
            }
            
            if dirty {
                console.warning("Installed \(type.repositoryName)")
            } else {
                console.print("Nothing to install")
            }
        }
    }
}