Skip to content

Commit 00ed8d3

Browse files
committed
Fixed a few typos in JBang support
1 parent 8646544 commit 00ed8d3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/JBangCatalogService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private Map<String, JBangAlias> listAliases(JBangSupport jbang, String remoteCat
128128
try {
129129
lines.addAll(jbang.execute("alias", "list", "--verbose", remoteCatalog));
130130
} catch (Exception e) {
131-
this.output.debug("Failed to list aliases from remote catalog: " + remoteCatalog + ". Ignorning.");
131+
this.output.debug("Failed to list aliases from remote catalog: " + remoteCatalog + ". Ignoring.");
132132
}
133133

134134
return readAliases(lines);
@@ -141,7 +141,7 @@ private Map<String, JBangAlias> listAliasesOrFallback(JBangSupport jbang, String
141141
localCatalogs.add(catalog.substring(0, catalog.indexOf(" ")));
142142
}
143143
} catch (Exception e) {
144-
this.output.debug("Failed to list jbang catalogs. Ignoring.");
144+
this.output.debug("Failed to list JBang catalogs. Ignoring.");
145145
}
146146

147147
//If there are locally installed catalogs, then go through every single one of them

independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/JBangSupport.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)