Skip to content

Commit 9b6f2c1

Browse files
committed
Add debug prints for asset hash extraction and writing
Added debugPrint statements to log asset hash extraction, hash file writing, and conditional hash file operations in extractAssetOrFile. This improves traceability and debugging of asset handling.
1 parent 6700068 commit 9b6f2c1

File tree

1 file changed

+5
-0
lines changed
  • src/serious_python_platform_interface/lib/src

1 file changed

+5
-0
lines changed

src/serious_python_platform_interface/lib/src/utils.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Future<String> extractAssetOrFile(String path,
2828
// read asset hash from asset
2929
try {
3030
assetHash = (await rootBundle.loadString("$path.hash")).trim();
31+
debugPrint("Asset hash for $path: $assetHash");
3132
// ignore: empty_catches
3233
} catch (e) {
3334
debugPrint("No asset hash file found for $path.hash: $e");
@@ -74,7 +75,11 @@ Future<String> extractAssetOrFile(String path,
7475
debugPrint("Finished unpacking application archive in ${stopwatch.elapsed}");
7576

7677
if (checkHash) {
78+
debugPrint("Writing hash file: ${hashFile.path}, hash: $assetHash");
7779
await hashFile.writeAsString(assetHash);
80+
debugPrint("Hash file written.");
81+
} else {
82+
debugPrint("Hash check not requested, skipping hash file write.");
7883
}
7984

8085
return destDir.path;

0 commit comments

Comments
 (0)