Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed May 13, 2024
1 parent 9200e39 commit 00479b9
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/run_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
dart: 3.0.5
- os: ubuntu-latest
dart: stable
- os: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion packages/process_run/lib/src/flutterbin_cmd.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bool get isFlutterSupportedSync => flutterExecutablePath != null;
class FlutterCmd extends ProcessCmd {
// Somehow flutter requires runInShell on Linux, does not hurt on windows
FlutterCmd(List<String> arguments)
: super(flutterExecutablePath, arguments, runInShell: true);
: super(flutterExecutablePath!, arguments, runInShell: true);

@override
String toString() => executableArgumentsToString('flutter', arguments);
Expand Down
2 changes: 1 addition & 1 deletion packages/process_run/lib/src/process_cmd.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:collection/collection.dart';
import 'package:process_run/process_run.dart';

class ProcessCmd {
String? executable;
String executable;
List<String> arguments;
String? workingDirectory;
Map<String, String>? environment;
Expand Down
2 changes: 1 addition & 1 deletion packages/process_run/lib/src/process_run.dart
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Future<ProcessResult> processCmdRun(ProcessCmd cmd,
}

try {
return await runExecutableArguments(cmd.executable!, cmd.arguments,
return await runExecutableArguments(cmd.executable, cmd.arguments,
workingDirectory: cmd.workingDirectory,
environment: cmd.environment,
includeParentEnvironment: cmd.includeParentEnvironment,
Expand Down
2 changes: 1 addition & 1 deletion packages/process_run/lib/src/shell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ abstract class Shell implements ShellCore, ShellCoreSync {
class _ProcessCmd extends ProcessCmd {
final String executableShortName;

_ProcessCmd(String super.executable, super.arguments,
_ProcessCmd(super.executable, super.arguments,
{required this.executableShortName});

@override
Expand Down
5 changes: 2 additions & 3 deletions packages/process_run/lib/src/shell_utils_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import 'package:path/path.dart';
import 'package:process_run/src/shell_utils.dart';

/// Convenient way to display a command
String executableArgumentsToString(
String? executable, List<String>? arguments) {
String executableArgumentsToString(String executable, List<String>? arguments) {
final sb = StringBuffer();
if (Platform.isWindows && (basename(executable!) == executable)) {
if (Platform.isWindows && (basename(executable) == executable)) {
var ext = extension(executable);
switch (ext) {
case '.exe':
Expand Down
2 changes: 1 addition & 1 deletion packages/process_run/test/process_cmd_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void main() {
expect(cmd1, isNot(cmd2));
});
test('dart_cmd', () async {
final result = await runCmd(ProcessCmd(dartExecutable, ['--version']));
final result = await runCmd(ProcessCmd(dartExecutable!, ['--version']));
testDartVersionOutput(result);
// 'Dart VM version: 1.7.0-dev.4.5 (Thu Oct 9 01:44:31 2014) on 'linux_x64'\n'
});
Expand Down
2 changes: 1 addition & 1 deletion packages/process_run/test/which_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void main() {
var dartExecutable = whichSync('dart', environment: env);
expect(dartExecutable, isNotNull);
print(dartExecutable);
var cmd = ProcessCmd(dartExecutable, ['--version']);
var cmd = ProcessCmd(dartExecutable!, ['--version']);
final result = await runCmd(cmd);
testDartVersionOutput(result);
});
Expand Down

0 comments on commit 00479b9

Please sign in to comment.