whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 01/02: Better default when HOME is not explicitly set
Date Sat, 17 Jun 2017 13:48:49 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit 5cde2bddfad53740e203d06410c1f484ca0e12a4
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sat Jun 17 09:47:17 2017 -0400

    Better default when HOME is not explicitly set
---
 lib/whimsy/asf/config.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/config.rb b/lib/whimsy/asf/config.rb
index 7500eae..be2744a 100644
--- a/lib/whimsy/asf/config.rb
+++ b/lib/whimsy/asf/config.rb
@@ -1,11 +1,12 @@
 # load configuration information from $HOME/.whimsy
 
 require 'yaml'
+require 'etc'
 
 module ASF
 
   class Config
-    @home = ENV['HOME'] || Dir.pwd
+    @home = ENV['HOME'] || Dir.home(Etc.getpwuid.name)
 
     @config = YAML.load_file("#@home/.whimsy") rescue {}
 

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <commits@whimsical.apache.org>.

Mime
View raw message