diff options
| author | Paul Buetow <paul@buetow.org> | 2025-11-01 22:58:50 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-11-01 22:58:50 +0200 |
| commit | 829b6cf7b4991f76bbf3ade3e31c617b2ca63361 (patch) | |
| tree | aead121d716d35f08a6e315d233c894f3ccc6a86 | |
| parent | 19de591d88b07153e431ab6c73f708cd751f0782 (diff) | |
some improvements
| -rwxr-xr-x | geheim.rb | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -203,7 +203,10 @@ class CommitFile include Log def commit_content(file:, content:, force: false) - fatal "#{file} already exists" if File.exist?(file) && !force + if File.exist?(file) && !force + warn "#{file} already exists. Use 'force' flag to overwrite." + return false + end dirname = File.dirname(file) unless File.directory?(dirname) @@ -589,6 +592,7 @@ class CLI help shell HELP + 0 end def shell_loop(argv) |
