Skip to content

Commit

Permalink
chore(aft): Fix analysis errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Dec 18, 2022
1 parent 80cd383 commit ae1ff5c
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class GenerateWorkflowsCommand extends AmplifyCommand {

@override
Future<void> run() async {
final allPackages = await this.allPackages;
final repoRoot = await rootDir;
await super.run();
for (final package in allPackages.values) {
if (package.pubspecInfo.pubspec.publishTo == 'none' &&
!falsePositiveExamples.contains(package.name)) {
Expand All @@ -43,13 +42,13 @@ class GenerateWorkflowsCommand extends AmplifyCommand {
continue;
}
final workflowFilepath = p.join(
repoRoot.path,
rootDir.path,
'.github',
'workflows',
'${package.name}.yaml',
);
final workflowFile = File(workflowFilepath);
final repoRelativePath = p.relative(package.path, from: repoRoot.path);
final repoRelativePath = p.relative(package.path, from: rootDir.path);
final customWorkflow = File(p.join(package.path, 'workflow.yaml'));
if (customWorkflow.existsSync()) {
customWorkflow.copySync(workflowFilepath);
Expand Down Expand Up @@ -83,7 +82,7 @@ class GenerateWorkflowsCommand extends AmplifyCommand {
];
final workflowPaths = [
...workflows.map((workflow) => '.github/workflows/$workflow'),
p.relative(workflowFilepath, from: repoRoot.path),
p.relative(workflowFilepath, from: rootDir.path),
].map((path) => " - '$path'").join('\n');

final workflowContents = StringBuffer(
Expand Down

0 comments on commit ae1ff5c

Please sign in to comment.