Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes committed Dec 12, 2024
1 parent 24f4719 commit 0a7c91e
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions pkgs/native_assets_cli/lib/src/code_assets/validation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,24 @@ ValidationErrors _validateCodeConfig(
break;
}
final compilerConfig = codeConfig.cCompiler;
final compiler = compilerConfig?.compiler.toFilePath();
if (compiler != null && !File(compiler).existsSync()) {
errors.add('$configName.codeConfig.compiler ($compiler) does not exist.');
}
final linker = compilerConfig?.linker.toFilePath();
if (linker != null && !File(linker).existsSync()) {
errors.add('$configName.codeConfig.linker ($linker) does not exist.');
}
final archiver = compilerConfig?.archiver.toFilePath();
if (archiver != null && !File(archiver).existsSync()) {
errors.add('$configName.codeConfig.archiver ($archiver) does not exist.');
}
final envScript = compilerConfig?.envScript?.toFilePath();
if (envScript != null && !File(envScript).existsSync()) {
errors.add('$configName.codeConfig.envScript ($envScript) does not exist.');
if (compilerConfig != null) {
final compiler = compilerConfig.compiler.toFilePath();
if (!File(compiler).existsSync()) {
errors.add('$configName.codeConfig.compiler ($compiler) does not exist.');
}
final linker = compilerConfig.linker.toFilePath();
if (!File(linker).existsSync()) {
errors.add('$configName.codeConfig.linker ($linker) does not exist.');
}
final archiver = compilerConfig.archiver.toFilePath();
if (!File(archiver).existsSync()) {
errors.add('$configName.codeConfig.archiver ($archiver) does not exist.');
}
final envScript = compilerConfig.envScript?.toFilePath();
if (envScript != null && !File(envScript).existsSync()) {
errors
.add('$configName.codeConfig.envScript ($envScript) does not exist.');
}
}
return errors;
}
Expand Down

0 comments on commit 0a7c91e

Please sign in to comment.