Skip to content

Commit 7ed1cef

Browse files
committed
Use join() from package:path for Windows compatibility
1 parent 242fce5 commit 7ed1cef

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/src/executable.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ final _runScriptPath = p.join(cacheDirPath, 'run.dart');
2727

2828
final _runScript = File(_runScriptPath);
2929

30-
const _configPath = 'tool/dart_dev/config.dart';
30+
final _configPath = p.join('tool', 'dart_dev', 'config.dart');
3131

32-
const _oldDevDartPath = 'tool/dev.dart';
32+
final _oldDevDartPath = p.join('tool', 'dev.dart');
3333

3434
final _relativeDevDartPath = p.relative(
3535
p.absolute(_configPath),
@@ -42,7 +42,7 @@ Future<void> run(List<String> args) async {
4242
final oldDevDartExists = File(_oldDevDartPath).existsSync();
4343

4444
if (!configExists) {
45-
log.fine('No custom `tool/dart_dev/config.dart` file found; '
45+
log.fine('No custom `$_configPath` file found; '
4646
'using default config.');
4747
}
4848
if (oldDevDartExists) {
@@ -162,8 +162,7 @@ Future<void> runWithConfig(
162162
config = configGetter();
163163
} catch (error) {
164164
stderr
165-
..writeln(
166-
'Invalid "tool/dart_dev/config.dart" in ${p.absolute(p.current)}')
165+
..writeln('Invalid "$_configPath" in ${p.absolute(p.current)}')
167166
..writeln()
168167
..writeln('It should provide a `Map<String, DevTool> config;` getter,'
169168
' but it either does not exist or threw unexpectedly:')

0 commit comments

Comments
 (0)