Skip to content

Commit d0be266

Browse files
committed
Fix windows subprocess
1 parent 960e607 commit d0be266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/apps/ad-use/ad_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def open_image(image_path: str):
190190
subprocess.run(['open', image_path], check=True)
191191
elif sys.platform.startswith('win'):
192192
# Windows
193-
os.startfile(image_path)
193+
subprocess.run(['cmd', '/c', 'start', '', image_path], check=True)
194194
else:
195195
# Linux
196196
subprocess.run(['xdg-open', image_path], check=True)

0 commit comments

Comments
 (0)