Skip to content

Commit db4b48a

Browse files
committed
Set Globs context
1 parent f69f235 commit db4b48a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/serious_python/bin/package_command.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ const platforms = {
6060
}
6161
};
6262

63-
final dartFile = Glob("**.dart");
64-
6563
const junkFilesDesktop = [
6664
"**.c",
6765
"**.h",
@@ -462,7 +460,9 @@ class PackageCommand extends Command {
462460
Future<void> cleanupDir(Directory directory, List<String> filesGlobs) async {
463461
verbose("Cleanup directory ${directory.path}: $filesGlobs");
464462
await cleanupDirRecursive(
465-
directory, filesGlobs.map((g) => Glob(g.replaceAll("\\", "/"))));
463+
directory,
464+
filesGlobs.map((g) => Glob(g.replaceAll("\\", "/"),
465+
context: path.Context(current: directory.path))));
466466
}
467467

468468
Future<bool> cleanupDirRecursive(
@@ -576,7 +576,8 @@ class PackageCommand extends Command {
576576
}
577577

578578
void duplicateSysconfigFile(String pythonDir) {
579-
final sysConfigGlob = Glob("python/lib/python3.*/_sysconfigdata__*.py");
579+
final sysConfigGlob = Glob("python/lib/python3.*/_sysconfigdata__*.py",
580+
context: path.Context(current: pythonDir));
580581
for (var sysConfig in sysConfigGlob.listSync(root: pythonDir)) {
581582
// copy the first found sys config and exit
582583
if (sysConfig is File) {

0 commit comments

Comments
 (0)