Simple App to help @jaspermayone make it through COMP1050 with a professor who won't use version control.

Fix git-lfs hook error by including full PATH in git process environment

+15
+15
ZipMerge/FileComparer.swift
··· 93 93 process.currentDirectoryURL = directory 94 94 process.arguments = arguments 95 95 96 + // Set up environment with full PATH so git hooks can find git-lfs and other tools 97 + var environment = ProcessInfo.processInfo.environment 98 + if let userPath = environment["PATH"] { 99 + // Ensure common git-lfs installation paths are included 100 + let additionalPaths = [ 101 + "/opt/homebrew/bin", 102 + "/usr/local/bin", 103 + "/etc/profiles/per-user/\(NSUserName())/bin" 104 + ] 105 + let pathComponents = userPath.split(separator: ":").map(String.init) 106 + let allPaths = (additionalPaths + pathComponents).joined(separator: ":") 107 + environment["PATH"] = allPaths 108 + } 109 + process.environment = environment 110 + 96 111 let outputPipe = Pipe() 97 112 let errorPipe = Pipe() 98 113 process.standardOutput = outputPipe