mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-11-04 05:27:04 +08:00 
			
		
		
		
	feature (nixos): working directory override - #403
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							49b652dd9c
						
					
				
				
					commit
					09a6b8f6c0
				
			@ -12,6 +12,9 @@ func GetCurrentDir() string {
 | 
				
			|||||||
	if MOCK_CURRENT_DIR != "" {
 | 
						if MOCK_CURRENT_DIR != "" {
 | 
				
			||||||
		return MOCK_CURRENT_DIR
 | 
							return MOCK_CURRENT_DIR
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if os.Getenv("WORK_DIR") != "" {
 | 
				
			||||||
 | 
							return os.Getenv("WORK_DIR")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	ex, _ := os.Executable()
 | 
						ex, _ := os.Executable()
 | 
				
			||||||
	return filepath.Dir(ex)
 | 
						return filepath.Dir(ex)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user