nitc iOS: report rmdir errors and quit
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 9 Sep 2016 14:32:42 +0000 (10:32 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 9 Sep 2016 15:47:45 +0000 (11:47 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/platform/ios.nit

index 76fefea..3178b49 100644 (file)
@@ -175,7 +175,14 @@ private class IOSToolchain
                toolcontext.exec_and_check(args, "iOS project error")
 
                # Move compiled app to destination
-               if outfile.file_exists then outfile.rmdir
+               if outfile.file_exists then
+                       var error = outfile.rmdir
+                       if error != null then
+                               print_error error
+                               exit 1
+                       end
+               end
+
                args = ["mv", "{ios_project_root}/build/Debug-iphonesimulator/{project_name}.app", outfile]
                toolcontext.exec_and_check(args, "iOS project error")
        end