Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -444,20 +444,20 @@ class FetchDefiApiStep extends BuildStep {
required String destinationFolder,
}) {
_log.fine('Looking for KDF at: $filePath');
final newExecutableName = path.basename(filePath).replaceAll('mm2', 'kdf');
final newExecutablePath = path.join(destinationFolder, newExecutableName);
if (FileSystemEntity.isFileSync(filePath)) {
final newExecutableName = path
.basename(filePath)
.replaceAll('mm2', 'kdf');
final newExecutablePath = path.join(destinationFolder, newExecutableName);

try {
File(filePath).renameSync(newExecutablePath);
_log.info('Renamed kdf from $filePath to $newExecutableName');
} catch (e) {
_log.severe('Failed to rename kdf: $e');
}
} else {
_log.warning('KDF not found at: $filePath');
// If it's already renamed, there's no need to log a warning.
if (!FileSystemEntity.isFileSync(newExecutablePath)) {
_log.warning('KDF not found at: $filePath');
}
}
}

Expand Down
Loading