Skip to content

Commit 425e18a

Browse files
poozaclaude
andcommitted
fix: Mastodonツールのtootctlコマンドでエラーハンドリングを追加
- 非ゼロステータスの場合にstderrを例外として投げるように変更 - ginseng-core 1.15.12に更新(chdir修正対応) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ed4b681 commit 425e18a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
GIT
22
remote: https://github.com/pooza/ginseng-core.git
3-
revision: c066e8e801783bbb4240d97d660bdd889c652fa0
3+
revision: 007cc8ecceb2c7a7b4348f13264abe7ac6ab59cb
44
specs:
5-
ginseng-core (1.15.11)
5+
ginseng-core (1.15.12)
66
activesupport (>= 7.0.7.1)
77
addressable (>= 2.8.0)
88
cgi (>= 0.4.2)
@@ -232,4 +232,4 @@ DEPENDENCIES
232232
test-unit
233233

234234
BUNDLED WITH
235-
4.0.6
235+
4.0.4

app/lib/writers_base/tool/mastodon_follow_tool.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def tootctl_command(args)
2424
)
2525
command.env = {'RAILS_ENV' => mastodon_rails_env}
2626
command.dir = mastodon_dir
27-
command.exec unless test?
27+
unless test?
28+
command.exec
29+
raise command.stderr if command.status.nonzero?
30+
end
2831
return command
2932
end
3033

app/lib/writers_base/tool/mastodon_maintenance_tool.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def tootctl_command(args)
2626
)
2727
command.env = {'RAILS_ENV' => mastodon_rails_env}
2828
command.dir = mastodon_dir
29-
command.exec unless test?
29+
unless test?
30+
command.exec
31+
raise command.stderr if command.status.nonzero?
32+
end
3033
return command
3134
end
3235

app/lib/writers_base/tool/mastodon_media_cleanup_tool.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def tootctl_command(args)
2626
)
2727
command.env = {'RAILS_ENV' => mastodon_rails_env}
2828
command.dir = mastodon_dir
29-
command.exec unless test?
29+
unless test?
30+
command.exec
31+
raise command.stderr if command.status.nonzero?
32+
end
3033
return command
3134
end
3235

0 commit comments

Comments
 (0)