File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,12 @@ class PackageCommand extends Command {
78
78
79
79
// discover dependencies
80
80
List <String >? dependencies;
81
+ final requirementsFile =
82
+ File (path.join (tempDir.path, 'requirements.txt' ));
81
83
final pyprojectFile = File (path.join (tempDir.path, 'pyproject.toml' ));
82
- if (pyprojectFile.existsSync ()) {
84
+ if (requirementsFile.existsSync ()) {
85
+ dependencies = await requirementsFile.readAsLines ();
86
+ } else if (pyprojectFile.existsSync ()) {
83
87
final content = await pyprojectFile.readAsString ();
84
88
final document = TomlDocument .parse (content).toMap ();
85
89
var depSection = findTomlDependencies (document);
@@ -93,12 +97,6 @@ class PackageCommand extends Command {
93
97
// depSection.keys.map((key) => '$key=${depSection[key]}'));
94
98
}
95
99
}
96
- } else {
97
- final requirementsFile =
98
- File (path.join (tempDir.path, 'requirements.txt' ));
99
- if (requirementsFile.existsSync ()) {
100
- dependencies = await requirementsFile.readAsLines ();
101
- }
102
100
}
103
101
104
102
// install dependencies
You can’t perform that action at this time.
0 commit comments