File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
approvaltests/src/main/java/org/approvaltests/reporters Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ private static void initializeFile() {
2727 }
2828
2929 private static void initializeLinux () {
30-
30+ scriptFile = new File (ApprovedFileLog .APPROVAL_TEMP_DIRECTORY + "/" + fileName + ".sh" );
31+ FileUtils .createIfNeeded (scriptFile .getAbsolutePath ());
32+ FileUtils .writeFile (scriptFile , "#!/bin/bash\n " );
33+ scriptFile .setExecutable (true );
3134 }
3235
3336 private static void initializeWindows () {
@@ -39,7 +42,7 @@ private static void initializeWindows() {
3942 @ Override
4043 public boolean report (String received , String approved ) {
4144 String commandLine = ClipboardReporter .getCommandLine (received , approved );
42- FileUtils .appendToFile (scriptFile , commandLine + "\r \ n " );
45+ FileUtils .appendToFile (scriptFile , commandLine + "\n " );
4346 return true ;
4447 }
4548}
You can’t perform that action at this time.
0 commit comments