From 5faf079149d15eafb381654ee6792291f553e915 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Wed, 29 Mar 2023 14:05:53 -0500 Subject: [PATCH] fix(shorebird_cli): remove extra newline when prompting for release version (#200) --- packages/shorebird_cli/lib/src/commands/patch_command.dart | 5 ++++- packages/shorebird_cli/lib/src/commands/release_command.dart | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/shorebird_cli/lib/src/commands/patch_command.dart b/packages/shorebird_cli/lib/src/commands/patch_command.dart index a7f159a0..7613b772 100644 --- a/packages/shorebird_cli/lib/src/commands/patch_command.dart +++ b/packages/shorebird_cli/lib/src/commands/patch_command.dart @@ -159,9 +159,12 @@ Did you forget to run "shorebird init"?''', final pubspecVersion = pubspecYaml.version!; final pubspecVersionString = '''${pubspecVersion.major}.${pubspecVersion.minor}.${pubspecVersion.patch}'''; + + if (releaseVersionArg == null) logger.info(''); + final releaseVersion = releaseVersionArg ?? logger.prompt( - '\nWhich release is this patch for?', + 'Which release is this patch for?', defaultValue: pubspecVersionString, ); final arch = results['arch'] as String; diff --git a/packages/shorebird_cli/lib/src/commands/release_command.dart b/packages/shorebird_cli/lib/src/commands/release_command.dart index be06f2a8..b9605d29 100644 --- a/packages/shorebird_cli/lib/src/commands/release_command.dart +++ b/packages/shorebird_cli/lib/src/commands/release_command.dart @@ -149,9 +149,12 @@ Did you forget to run "shorebird init"?''', final pubspecVersion = pubspecYaml.version!; final pubspecVersionString = '''${pubspecVersion.major}.${pubspecVersion.minor}.${pubspecVersion.patch}'''; + + if (releaseVersionArg == null) logger.info(''); + final releaseVersion = releaseVersionArg ?? logger.prompt( - '\nWhat is the version of this release?', + 'What is the version of this release?', defaultValue: pubspecVersionString, ); final arch = results['arch'] as String;