File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
src/main/java/io/github/fvarrui/javapackager Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 88import java .util .List ;
99
1010import org .apache .commons .lang3 .StringUtils ;
11+ import org .apache .commons .lang3 .SystemUtils ;
1112import org .apache .maven .plugin .MojoExecutionException ;
1213
1314import io .github .fvarrui .javapackager .model .Platform ;
1415import io .github .fvarrui .javapackager .utils .CommandUtils ;
1516import io .github .fvarrui .javapackager .utils .FileUtils ;
1617import io .github .fvarrui .javapackager .utils .Logger ;
18+ import io .github .fvarrui .javapackager .utils .ThreadUtils ;
1719import io .github .fvarrui .javapackager .utils .VelocityUtils ;
1820
1921public class MacPackager extends Packager {
@@ -174,6 +176,10 @@ private File generateDmg() throws MojoExecutionException {
174176 .findFirst ().get ();
175177 Logger .info ("- Device name: " + deviceName );
176178
179+ // pause to prevent occasional "Can't get disk" (-1728) issues
180+ // https://github.com/seltzered/create-dmg/commit/5fe7802917bb85b40c0630b026d33e421db914ea
181+ ThreadUtils .sleep (2000L );
182+
177183 // renders applescript
178184 File applescriptFile = new File (assetsFolder , "customize-dmg.applescript" );
179185 VelocityUtils .render ("/mac/customize-dmg.applescript.vtl" , applescriptFile , this );
Original file line number Diff line number Diff line change 1+ package io .github .fvarrui .javapackager .utils ;
2+
3+ public class ThreadUtils {
4+
5+ public static void sleep (long millis ) {
6+ try {
7+ Thread .sleep (millis );
8+ } catch (InterruptedException e ) {
9+ Logger .error (e .getMessage ());
10+ }
11+ }
12+
13+ }
You can’t perform that action at this time.
0 commit comments