x
This commit is contained in:
1 parent
6a35dcf955
commit
b362f5cadf
10 files changed
+335
-78
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import pty
|
||||
import os
|
||||
import sys
|
||||
|
||||
pid, fd = pty.fork()
|
||||
if pid == 0:
|
||||
os.execvp("bun", ["bun", "run", "./node_modules/.bin/prisma", "migrate", "dev", "--name", "remove_product_price"])
|
||||
else:
|
||||
while True:
|
||||
try:
|
||||
output = os.read(fd, 1024)
|
||||
if not output: break
|
||||
sys.stdout.write(output.decode('utf-8', 'ignore'))
|
||||
sys.stdout.flush()
|
||||
lower_out = output.lower()
|
||||
if b"(y/n)" in lower_out or b"reset" in lower_out:
|
||||
os.write(fd, b"y\n")
|
||||
except OSError:
|
||||
break
|
||||
Reference in new issue
Block a user