From 3257469a69c0b79c993a2a4e5449cd7aa636c3f8 Mon Sep 17 00:00:00 2001 From: dsisnero Date: Fri, 15 Jan 2016 17:06:50 -0700 Subject: [PATCH] Update base_cli for windows if ENV['HOME'] is set --- samples/lib/base_cli.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/lib/base_cli.rb b/samples/lib/base_cli.rb index ad9e969d1..cf24e1be1 100644 --- a/samples/lib/base_cli.rb +++ b/samples/lib/base_cli.rb @@ -47,7 +47,8 @@ class BaseCli < Thor # on Windows) def well_known_path_for(file) if OS.windows? - File.join(ENV['APPDATA'], 'google', file) + dir = ENV.fetch('HOME'){ ENV['APPDATA']} + File.join(dir, 'google', file) else File.join(ENV['HOME'], '.config', 'google', file) end