when os.execute() is used the terminal breaks.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MegaByte
Prole
Posts: 4
Joined: Sat Mar 01, 2025 7:57 pm

when os.execute() is used the terminal breaks.

Post by MegaByte »

I am using os.execute to copy some files from one folder to another but when I do this the terminal stops working properly. It stops showing certain characters.
This happens with any command.

Code: Select all

print("\nTESTE\n")
os.execute('copy "' .. file .. '" "' .. newPath .. '" > nul 2>&1')
print("\nOK TESTE\n")
Terminal :
noTerminal.png
noTerminal.png (786 Bytes) Viewed 538 times

Code: Select all

print("\nTESTE\n")
os.execute('copy "' .. file .. '" "' .. newPath .. '"')
print("\nOK TESTE\n")
Terminal :
no.png
no.png (1.08 KiB) Viewed 538 times
User avatar
ivan
Party member
Posts: 1939
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: when os.execute() is used the terminal breaks.

Post by ivan »

If I remember correctly, this is a platform-specific bug. Have you tried:

Code: Select all

io.popen(command_to_execute)
MegaByte
Prole
Posts: 4
Joined: Sat Mar 01, 2025 7:57 pm

Re: when os.execute() is used the terminal breaks.

Post by MegaByte »

ivan wrote: Sun Mar 09, 2025 8:19 pm If I remember correctly, this is a platform-specific bug. Have you tried:

Code: Select all

io.popen(command_to_execute)
it worked. Thank you very much
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests