mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-11-18 20:15:11 +00:00
Use USER env var instead of LOGNAME (#1559)
During user switch with su/sudo in system LOGNAME may not be initialised, but USER env var is always exist.
This commit is contained in:
1 parent
c32aa4cc94
commit
38d76e7fa1
1 file changed
+1
-1
@@ -100,7 +100,7 @@ class GenerateCommand: ProjectCommand {
|
||||
do {
|
||||
let projectGenerator = ProjectGenerator(project: project)
|
||||
|
||||
guard let userName = ProcessInfo.processInfo.environment["LOGNAME"] else {
|
||||
guard let userName = ProcessInfo.processInfo.environment["USER"] else {
|
||||
throw GenerationError.missingUsername
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user