mirror of
				https://github.com/minio/minio.git
				synced 2025-10-30 00:05:02 -04:00 
			
		
		
		
	pkg/user: Support 32bit darwin in user package.
This commit is contained in:
		
							parent
							
								
									e79a73a3f5
								
							
						
					
					
						commit
						42fcb27308
					
				| @ -39,14 +39,16 @@ func Current() (*user.User, error) { | ||||
| 		} | ||||
| 		return &user.User{Uid: "0", Gid: "0", Username: "root", Name: "root", HomeDir: wd}, nil | ||||
| 	} | ||||
| 	if runtime.GOARCH == "386" && runtime.GOOS == "linux" { | ||||
| 		return &user.User{ | ||||
| 			Uid:      strconv.Itoa(os.Getuid()), | ||||
| 			Gid:      strconv.Itoa(os.Getgid()), | ||||
| 			Username: os.Getenv("USER"), | ||||
| 			Name:     os.Getenv("USER"), | ||||
| 			HomeDir:  os.Getenv("HOME"), | ||||
| 		}, nil | ||||
| 	if runtime.GOARCH == "386" { | ||||
| 		if runtime.GOOS == "linux" || runtime.GOOS == "darwin" { | ||||
| 			return &user.User{ | ||||
| 				Uid:      strconv.Itoa(os.Getuid()), | ||||
| 				Gid:      strconv.Itoa(os.Getgid()), | ||||
| 				Username: os.Getenv("USER"), | ||||
| 				Name:     os.Getenv("USER"), | ||||
| 				HomeDir:  os.Getenv("HOME"), | ||||
| 			}, nil | ||||
| 		} | ||||
| 	} | ||||
| 	user, e := user.Current() | ||||
| 	if e != nil { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user