lib/faastruby/cli/commands/project/deploy.rb in faastruby-0.5.18 vs lib/faastruby/cli/commands/project/deploy.rb in faastruby-0.5.19

- old
+ new

@@ -16,10 +16,10 @@ @mutex = Mutex.new @failed = {} @options['functions'] += find_functions unless @options['functions'].any? @options['environment'] ||= 'stage' @project_yaml = YAML.load(File.read(PROJECT_YAML_FILE))['project'] rescue FaaStRuby::CLI.error("Could not find file 'project.yml'. Are you running this command from the project's folder?") - @project_secrets = YAML.load(File.read(PROJECT_SECRETS_FILE))['secrets'] rescue {secrets: {}} + @project_secrets = (YAML.load(File.read(PROJECT_SECRETS_FILE))['secrets'] || {}) rescue {} @project_name = @project_yaml['name'] @root_to = @project_yaml['root_to'] || 'root' @catch_all = @project_yaml['catch_all'] || 'catch-all' @project_identifier = "-#{@project_yaml['identifier']}" if @project_yaml['identifier'] @workspace = "#{@project_name}-#{@options['environment']}#{@project_identifier}"