Skip to content

Commit

Permalink
show credentials content (#11)
Browse files Browse the repository at this point in the history
* show credentials content

* add blank line
  • Loading branch information
juliocabrera820 authored May 4, 2024
1 parent 058e793 commit 4158c16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ def self.add_rubygems_credentials

def self.generate_credentials_file
FileUtils.mkdir_p(gems_path)
credentials = '---'
File.open(credentials_file_path, 'w') { |f| f.write(credentials) }
file_start = "---\n"
File.open(credentials_file_path, 'w') { |f| f.write(file_start) }
end

def self.write_credentials(credentials)
File.open(credentials_file_path, 'a') { |f| f.write(credentials) }
File.open(credentials_file_path, 'a') { |f| f.write("#{credentials}\n") }
FileUtils.chmod(0o600, credentials_file_path)
end

Expand Down

0 comments on commit 4158c16

Please sign in to comment.