File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ module Sentry
145
145
property display_name : String
146
146
property should_build = true
147
147
property files = [] of String
148
+ @sound_player : String = " "
148
149
149
150
def initialize (
150
151
@display_name : String ,
@@ -163,6 +164,12 @@ module Sentry
163
164
@app_built = false
164
165
@should_install_shards = install_shards
165
166
@colorize = colorize
167
+
168
+ {% if flag?(:linux ) % }
169
+ @sound_player = ` which aplay 2>/dev/null` .chomp
170
+ {% elsif flag(:darwin ) % }
171
+ @sound_player = ` which afplay 2>/dev/null` .chomp
172
+ {% end % }
166
173
end
167
174
168
175
private def stdout (str : String )
@@ -191,6 +198,7 @@ module Sentry
191
198
app_process.signal(:kill )
192
199
app_process.wait
193
200
end
201
+ ` #{ @sound_player } #{ __DIR__ } /sounds/drip.wav` unless @sound_player .blank?
194
202
end
195
203
196
204
stdout " 🤖 starting #{ display_name } ..."
@@ -217,6 +225,8 @@ module Sentry
217
225
elsif ! @app_built # if build fails on first time compiling, then exit
218
226
stdout " 🤖 Compile time errors detected. SentryBot shutting down..."
219
227
exit 1
228
+ else
229
+ ` #{ @sound_player } #{ __DIR__ } /sounds/error.wav` unless @sound_player .blank?
220
230
end
221
231
end
222
232
You can’t perform that action at this time.
0 commit comments