lib/berkshelf/api/config.rb in berkshelf-api-1.1.1 vs lib/berkshelf/api/config.rb in berkshelf-api-1.2.0.rc1
- old
+ new
@@ -4,17 +4,17 @@
module Berkshelf::API
class Config < Buff::Config::JSON
class << self
# @return [String]
def default_path
- home_path = ENV['BERKSHELF_API_PATH'] || "~/.berkshelf/api-server"
+ home_path = ENV['BERKSHELF_API_PATH'] || "#{ENV['HOME']}/.berkshelf/api-server"
File.expand_path(File.join(home_path, "config.json"))
end
end
attribute 'home_path',
type: String,
- default: File.expand_path("~/.berkshelf/api-server")
+ default: File.expand_path("#{ENV['HOME']}/.berkshelf/api-server")
attribute 'endpoints',
type: Array,
default: [
{