Skip to content

Commit

Permalink
cd: windows choco copy failed
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed May 7, 2024
1 parent ec62cff commit bb3f83d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/commands/build/windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class WindowsBuildCommand extends Command with BuildCommandCommonSteps {

final exeFile = File(exePath);

final hash = sha256.convert(exeFile.readAsBytesSync()).toString();
final hash = sha256.convert(await exeFile.readAsBytes()).toString();

final chocoVerificationFile = File(chocoFiles.first);

Expand All @@ -74,8 +74,9 @@ class WindowsBuildCommand extends Command with BuildCommandCommonSteps {
),
);

final chocoToolsPath = join(cwd.path, "choco-struct", "tools");
exeFile.copySync(chocoToolsPath);
await exeFile.copy(
join(cwd.path, "choco-struct", "tools", basename(exeFile.path)),
);

await shell.run(
"choco pack ${chocoFiles[1]} --outputdirectory ${join(cwd.path, "dist")}",
Expand Down

0 comments on commit bb3f83d

Please sign in to comment.