Skip to content

Commit e24ed66

Browse files
committed
Fix platform detection in package command
1 parent fe82c9c commit e24ed66

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bin/package_command.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'dart:io';
33

44
import 'package:archive/archive_io.dart';
55
import 'package:args/command_runner.dart';
6-
import 'package:flutter/foundation.dart';
76
import 'package:http/http.dart' as http;
87
import 'package:path/path.dart' as path;
98
import 'package:toml/toml.dart';
@@ -261,7 +260,7 @@ class PackageCommand extends Command {
261260
}
262261

263262
// Run the python executable
264-
var pythonPath = defaultTargetPlatform == TargetPlatform.windows
263+
var pythonPath = Platform.isWindows
265264
? path.join(pythonDir.path, 'python', 'python.exe')
266265
: path.join(pythonDir.path, 'python', 'bin', 'python3');
267266
return await runExec(pythonPath, args, environment: environment);

0 commit comments

Comments
 (0)