diff options
| author | Paul Buetow <paul@buetow.org> | 2023-05-26 18:14:01 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-05-26 18:14:01 +0300 |
| commit | ffb0109a9628a4769e426a74ac1244eeaaf51aca (patch) | |
| tree | 44b85b299452c51a8150888b36075be60bc0443f | |
| parent | 26b7b9c20a91fafab696d784b18aafe59006fd70 (diff) | |
fix
| -rwxr-xr-x | geheim.rb | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -39,7 +39,9 @@ module Log puts "#{prefix} #{line}" end end - end + rescue => e + log(e) + end end module Git @@ -161,7 +163,7 @@ class CommitFile include Log def commit_content(file:, content:, force: false) - if File.exists?(file) and !force + if File.exist?(file) and !force fatal "#{file} already exists" end @@ -412,7 +414,7 @@ class Geheim hash = hash_path(dest_path) - fatal "#{file} does not exist!" unless File.exists?(src_path) + fatal "#{file} does not exist!" unless File.exist?(src_path) log "Importing #{src_path} -> #{dest_path}" data = File.read(src_path) shred_file(file: src_path) if action == :newtxt |
