Skip to content

Commit 38d76e7

Browse files
authored
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.
1 parent c32aa4c commit 38d76e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/XcodeGenCLI/Commands/GenerateCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class GenerateCommand: ProjectCommand {
100100
do {
101101
let projectGenerator = ProjectGenerator(project: project)
102102

103-
guard let userName = ProcessInfo.processInfo.environment["LOGNAME"] else {
103+
guard let userName = ProcessInfo.processInfo.environment["USER"] else {
104104
throw GenerationError.missingUsername
105105
}
106106

0 commit comments

Comments
 (0)