You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most interactions with a shell are not 1-to-1 interchangeable between unix and windows.
Shell interactions happen through functions system, unix and dos, and within AA also aas_shell. They can also happen by having lines of code in the m file starting with a !.
In AA, aas_shell is a dedicated wrapper function around a system call. However, the system function is also used without the aas_shell wrapper in multiple places.
Fixes:
Preferably, use a matlab provided function instead of doing a shell interaction.
Example: use mkdir(dirpath) instead of system(sprintf('mkdir %s', dirpath). This also allows for better success checking.
If there is no matlab provided alternative, have a dedicated aa wrapper function for often-occurring shell interactions.
Have a dedicated version of the command for use on windows.
Additionally, make sure all shell interaction goes through aas_shell. And there have an extra input is_pc_safe, default false, to indicate that a command provided to aas_shell has been checked for windows compatibility. If not, throw an error on windows, so as not to execute unchecked code.
The text was updated successfully, but these errors were encountered:
Most interactions with a shell are not 1-to-1 interchangeable between unix and windows.
Shell interactions happen through functions system, unix and dos, and within AA also aas_shell. They can also happen by having lines of code in the m file starting with a !.
In AA, aas_shell is a dedicated wrapper function around a system call. However, the system function is also used without the aas_shell wrapper in multiple places.
Fixes:
Example: use mkdir(dirpath) instead of system(sprintf('mkdir %s', dirpath). This also allows for better success checking.
The text was updated successfully, but these errors were encountered: