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
The codebase contains a sed command that doesn't work uniformly across different operating systems, specifically GNU/Linux and macOS. The incompatibility leads to an error message:
A possible fix would to use preprocessor directives to detect the operating system at compile time and choose the correct syntax accordingly. If I run the test in francinette everything works smoothly.
The text was updated successfully, but these errors were encountered:
The codebase contains a sed command that doesn't work uniformly across different operating systems, specifically GNU/Linux and macOS. The incompatibility leads to an error message:
sed: 1: "tmp/errorBash.tmp": undefined label 'mp/errorBash.tmp'
The line in question is in src/test.c, line 108
system("sed -i 's/bash/pipex/g' tmp/errorBash.tmp");
On macOS, the syntax for in-place editing with sed requires an additional argument to specify the file extension for backups.
I fixed it with
system("sed -i '' 's/bash/pipex/g' tmp/errorBash.tmp");
A possible fix would to use preprocessor directives to detect the operating system at compile time and choose the correct syntax accordingly. If I run the test in francinette everything works smoothly.
The text was updated successfully, but these errors were encountered: