File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lib/commands/upload/snapshots Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ def call(image_paths:, **options)
4848
4949 start_time = Time . now
5050 run_id = nil
51+ success = false
5152
5253 begin
5354 api_token = @options [ :api_token ] || ENV [ 'EMERGE_API_TOKEN' ]
@@ -76,12 +77,16 @@ def call(image_paths:, **options)
7677 Logger . info "Time taken: #{ ( Time . now - start_time ) . round ( 2 ) } seconds"
7778 @profiler . report
7879 Logger . info "✅ View your snapshots at https://emergetools.com/snapshot/#{ run_id } "
80+ success = true
7981 rescue StandardError => e
8082 Logger . error "CLI Error: #{ e . message } "
8183 Sync { report_error ( run_id , e . message , 'crash' ) } if run_id
84+ raise e # Re-raise the error to dry-cli
8285 ensure
8386 @network &.close
8487 end
88+
89+ success
8590 end
8691
8792 private
@@ -116,6 +121,7 @@ def create_client(image_paths)
116121
117122 def find_image_files ( client )
118123 found_images = client . image_files
124+ raise 'No images found. Please check your image paths or project configuration.' if found_images . empty?
119125 Logger . info "Found #{ found_images . size } images"
120126 found_images
121127 end
You can’t perform that action at this time.
0 commit comments