diff options
| author | Paul Buetow <paul@buetow.org> | 2025-05-16 20:16:08 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-05-16 20:16:08 +0300 |
| commit | 88a85d1aaccd40baf7c6e44d587ecf068521bf0b (patch) | |
| tree | 67aaa33a6aa95701beee96d4b628d1bb85dec731 | |
| parent | 83686acb7ad04bccb34cadf5d9d116a94e1441fd (diff) | |
Update
| -rw-r--r-- | dotfiles/scripts/taskwarriorfeeder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dotfiles/scripts/taskwarriorfeeder.rb b/dotfiles/scripts/taskwarriorfeeder.rb index e6721da..5566645 100644 --- a/dotfiles/scripts/taskwarriorfeeder.rb +++ b/dotfiles/scripts/taskwarriorfeeder.rb @@ -168,7 +168,7 @@ begin end end - if Dir.exist?(GOS_DIR) + if Dir.exist?(GOS_DIR) && !opts[:dry_run] Dir["#{WORKTIME_DIR}/tw-gos-*.json"].each do |tw_gos| JSON.parse(File.read(tw_gos)).each_with_index do |entry, i| File.write("#{GOS_DIR}/tw-#{Time.now.to_i}-#{i}.txt", <<~GOS_ENTRY) @@ -176,8 +176,8 @@ begin #{entry['description']} GOS_ENTRY - File.delete(tw_gos) end + File.delete(tw_gos) end end |
