File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,10 @@ void main() {
6565
6666 // customize content to clear publishing warnings
6767 final pubspecFile = File (p.join (pkgDir, 'pubspec.yaml' ));
68- final pubspecContent = await pubspecFile.readAsString ();
68+ final pubspecContent = (await pubspecFile.readAsString ())
69+ // Avoid specific sdk constraint.
70+ .replaceFirst (RegExp ('sdk: .*' ), 'sdk: ^3.0.0' );
71+
6972 await pubspecFile.writeAsString (
7073 'homepage: https://github.com/abc/xyz\n $pubspecContent ' );
7174 await File (p.join (pkgDir, 'LICENSE' ))
@@ -75,8 +78,8 @@ void main() {
7578 await localDartTool.publish (
7679 pkgDir,
7780 expectedErrorContains:
78- '`description` contains a generic text fragment coming from package templates (`A sample command-line application`).\n '
79- 'Please follow the guides to describe your package:\n '
81+ '`description` contains a generic text fragment coming from package templates (`A sample command-line application`). '
82+ 'Please follow the guides to describe your package: '
8083 'https://dart.dev/tools/pub/pubspec#description' ,
8184 );
8285 } finally {
You can’t perform that action at this time.
0 commit comments