File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -28935,6 +28935,8 @@ async function upload() {
28935
28935
fromBeginning: true,
28936
28936
});
28937
28937
daemonLog.on("line", (line) => core.info(line));
28938
+ // Give the Nix daemon/socket some time to flush all the post-build hooks
28939
+ await waitFor(500);
28938
28940
try {
28939
28941
core.debug("Waiting for Cachix daemon to exit...");
28940
28942
await exec.exec(cachixBin, [
@@ -28946,7 +28948,7 @@ async function upload() {
28946
28948
}
28947
28949
finally {
28948
28950
// Wait a bit for the logs to flush through
28949
- await new Promise((resolve) => setTimeout(resolve, 1000) );
28951
+ await waitFor( 1000);
28950
28952
daemonLog.unwatch();
28951
28953
}
28952
28954
break;
@@ -29119,6 +29121,9 @@ function partitionUsersAndGroups(mixedUsers) {
29119
29121
function splitArgs(args) {
29120
29122
return args.split(" ").filter((arg) => arg !== "");
29121
29123
}
29124
+ function waitFor(ms) {
29125
+ return new Promise((resolve) => setTimeout(resolve, ms));
29126
+ }
29122
29127
const isPost = !!core.getState("isPost");
29123
29128
// Main
29124
29129
try {
Original file line number Diff line number Diff line change @@ -261,6 +261,9 @@ async function upload() {
261
261
} ) ;
262
262
daemonLog . on ( "line" , ( line ) => core . info ( line ) ) ;
263
263
264
+ // Give the Nix daemon/socket some time to flush all the post-build hooks
265
+ await waitFor ( 500 ) ;
266
+
264
267
try {
265
268
core . debug ( "Waiting for Cachix daemon to exit..." ) ;
266
269
await exec . exec ( cachixBin , [
@@ -271,7 +274,7 @@ async function upload() {
271
274
] ) ;
272
275
} finally {
273
276
// Wait a bit for the logs to flush through
274
- await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
277
+ await waitFor ( 1000 ) ;
275
278
daemonLog . unwatch ( ) ;
276
279
}
277
280
@@ -490,6 +493,10 @@ function splitArgs(args: string): string[] {
490
493
return args . split ( " " ) . filter ( ( arg ) => arg !== "" ) ;
491
494
}
492
495
496
+ function waitFor ( ms : number ) : Promise < void > {
497
+ return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
498
+ }
499
+
493
500
const isPost = ! ! core . getState ( "isPost" ) ;
494
501
495
502
// Main
You can’t perform that action at this time.
0 commit comments