Skip to content

Commit

Permalink
chore: improved trust console messages
Browse files Browse the repository at this point in the history
  • Loading branch information
quintesse committed Mar 21, 2024
1 parent bc32cd3 commit ed6b115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/dev/jbang/net/TrustedSources.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ protected String getJSon(Collection<String> rules) {
}

public void addTemporary(String trust) {
Util.infoMsg("Adding temporary " + trust);
Util.infoMsg("Trusting for this run: " + trust);
Set<String> newrules = new LinkedHashSet<>(Arrays.asList(temporaryTrustedSources));
if (newrules.add(trust)) {
temporaryTrustedSources = newrules.toArray(new String[0]);
Expand All @@ -228,7 +228,7 @@ public void add(String trust, File storage) {

public void add(List<String> trust, File storage) {

Util.infoMsg("Adding " + trust + " to " + storage);
Util.infoMsg("Trusting permanently: " + trust);

Set<String> newrules = new LinkedHashSet<>(Arrays.asList(trustedSources));

Expand All @@ -243,7 +243,7 @@ public void add(List<String> trust, File storage) {

public void remove(List<String> trust, File storage) {

Util.infoMsg("Removing " + trust + " from " + storage);
Util.infoMsg("Removing permanent trust: " + trust);

Set<String> newrules = new LinkedHashSet<>(Arrays.asList(trustedSources));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static ResourceRef fetchScriptFromUntrustedURL(String scriptURL) {
String trustOrgUrl = orgURL(trustUrl);
List<String> options = new ArrayList<>();
options.add(
"Trust once: Add no trust, just download this time (can be run multiple times while cached)");
"Trust once: Add no trust, only allow access to this URL for the duration of this run");
options.add("Trust limited url in future: " + trustUrl);
if (trustOrgUrl != null) {
options.add("Trust organization url in future: " + trustOrgUrl);
Expand Down

0 comments on commit ed6b115

Please sign in to comment.