Bump package:process version (#8073)
This commit is contained in:
committed by
GitHub
parent
fe0b909313
commit
cff7dc5444
@@ -46,13 +46,6 @@ abstract class OperatingSystemUtils {
|
||||
File makePipe(String path);
|
||||
|
||||
void unzip(File file, Directory targetDirectory);
|
||||
|
||||
/// Returns the name of the [binaryName] executable.
|
||||
///
|
||||
/// No-op on most OS.
|
||||
/// On Windows it returns [binaryName].[winExtension], if [winExtension] is
|
||||
/// specified, or [binaryName].exe otherwise.
|
||||
String getExecutableName(String binaryName, { String winExtension });
|
||||
}
|
||||
|
||||
class _PosixUtils extends OperatingSystemUtils {
|
||||
@@ -85,9 +78,6 @@ class _PosixUtils extends OperatingSystemUtils {
|
||||
runSync(<String>['mkfifo', path]);
|
||||
return fs.file(path);
|
||||
}
|
||||
|
||||
@override
|
||||
String getExecutableName(String binaryName, { String winExtension }) => binaryName;
|
||||
}
|
||||
|
||||
class _WindowsUtils extends OperatingSystemUtils {
|
||||
@@ -127,14 +117,6 @@ class _WindowsUtils extends OperatingSystemUtils {
|
||||
File makePipe(String path) {
|
||||
throw new UnsupportedError('makePipe is not implemented on Windows.');
|
||||
}
|
||||
|
||||
@override
|
||||
String getExecutableName(String binaryName, { String winExtension }) {
|
||||
winExtension ??= 'exe';
|
||||
if (path.extension(binaryName).isEmpty && winExtension.isNotEmpty)
|
||||
return '$binaryName.$winExtension';
|
||||
return binaryName;
|
||||
}
|
||||
}
|
||||
|
||||
Future<int> findAvailablePort() async {
|
||||
|
||||
Reference in New Issue
Block a user