This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new ae347213 argparser drops options!
ae347213 is described below

commit ae347213f3e29bd67b93e431019b89877eb1fcfc
Author: Sebb <[email protected]>
AuthorDate: Thu Jun 26 15:58:58 2025 +0100

    argparser drops options!
---
 tools/pubsub.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/pubsub.rb b/tools/pubsub.rb
index d88149c0..81f9ce4d 100644
--- a/tools/pubsub.rb
+++ b/tools/pubsub.rb
@@ -26,6 +26,9 @@ script = File.basename(__FILE__, '.rb')
 ### option parsing
 #
 
+ARGV_COPY = ARGV.dup # the parser removes options from ARGV
+puts stamp "Initial args: #{ARGV}"
+
 options = OpenStruct.new
 options.remote = 'https://gitbox.apache.org/repos/asf/whimsy.git'
 options.local = '/srv/whimsy'
@@ -250,6 +253,7 @@ rescue Exception => e
     restartable = false # why?
   end
 end
+puts stamp 'Preparing to exit'
 
 #
 # restart
@@ -260,7 +264,8 @@ if restartable
 
   # relaunch script after a one second delay
   sleep 1
-  exec RbConfig.ruby, __FILE__, *ARGV
+  puts stamp "Relaunching with args: #{ARGV_COPY}"
+  exec RbConfig.ruby, __FILE__, *ARGV_COPY
 else
   STDERR.puts stamp 'not restartable'
 end

Reply via email to