@@ -92,7 +92,7 @@ public Optional<File> getOptionalExecutable(boolean shouldEnsureInstallation) {
9292 }
9393
9494 public File getExecutable () {
95- return getOptionalExecutable ().orElseThrow (() -> new IllegalStateException ("Unable to find and install jbang! " ));
95+ return getOptionalExecutable ().orElseThrow (() -> new IllegalStateException ("Unable to find and install JBang " ));
9696 }
9797
9898 public Path getWorkingDirectory () {
@@ -158,7 +158,7 @@ public boolean isInstallable() {
158158 public boolean promptForInstallation () {
159159 // We don't want to prompt users for input when running tests.
160160 if (interactiveMode
161- && Prompt .yesOrNo (true , "JBang is needed to list / run jbang plugins, would you like to install it now ?" )) {
161+ && Prompt .yesOrNo (true , "JBang is needed to list/ run JBang plugins, would you like to install it now?" )) {
162162 return true ;
163163 }
164164 return false ;
@@ -180,15 +180,15 @@ private boolean doEnsureJBangIsInstalledInternal() {
180180 return true ;
181181 }
182182 if (!isInstallable ()) {
183- output .warn ("JBang is not installable! " );
183+ output .warn ("JBang is not installable" );
184184 return false ;
185185 }
186186 if (promptForInstallation ()) {
187187 try {
188188 installJBang ();
189189 return true ;
190190 } catch (Exception e ) {
191- output .warn ("Failed to install jbang! " );
191+ output .warn ("Failed to install JBang " );
192192 return false ;
193193 }
194194 } else {
@@ -203,7 +203,7 @@ private Path getInstallationDir() {
203203 dir = dir .map (Path ::getParent );
204204 }
205205 return dir .map (d -> d .resolve (".jbang" ))
206- .orElseThrow (() -> new IllegalStateException ("Failed to determinte .jbang directory! " ));
206+ .orElseThrow (() -> new IllegalStateException ("Failed to determine .jbang directory" ));
207207 }
208208
209209 private void installJBang () {
@@ -212,13 +212,13 @@ private void installJBang() {
212212 Path downloadDir = Files .createTempDirectory ("jbang-download-" );
213213
214214 if (!downloadDir .toFile ().exists () && !downloadDir .toFile ().mkdirs ()) {
215- throw new IOException ("Failed to create jbang download directory: " + downloadDir .toAbsolutePath ().toString ());
215+ throw new IOException ("Failed to create JBang download directory: " + downloadDir .toAbsolutePath ().toString ());
216216 }
217217
218218 Path downloadFile = downloadDir .resolve ("jbang.zip" );
219219 Path installDir = getInstallationDir ();
220220 if (!installDir .toFile ().exists () && !installDir .toFile ().mkdirs ()) {
221- throw new IOException ("Failed to create jbang install directory: " + installDir .toAbsolutePath ().toString ());
221+ throw new IOException ("Failed to create JBang install directory: " + installDir .toAbsolutePath ().toString ());
222222 }
223223 HttpClient client = HttpClient .newBuilder ().followRedirects (HttpClient .Redirect .ALWAYS ).build ();
224224 HttpRequest request = HttpRequest .newBuilder ()
0 commit comments