This is slightly linked #1741. 

In 
https://github.com/liquibase/liquibase/blob/10a0c509c59401e9351cf7d134b4bc671b5d500f/liquibase-core/src/main/java/liquibase/hub/HubUpdater.java#L364-L383

The currently held lock is released and then reacquired again. However, when using Liquibase programatically as a library the prompt is always disabled and therefore releasing and then acquiring the lock is entirely not needed.

Can I propose a change that will do

```
if (!Scope.getCurrentScope().getUI().getAllowPrompt()) {
    return;
}
```

This will solve the problem with the polluting of the logging with "Skipping auto-registration" since registering is anyways not possible when using it as a library.



┆Issue is synchronized with this [Jira Story](https://datical.atlassian.net/browse/LB-1748) by [Unito](https://www.unito.io)

Scope.getCurrentScope().getUI().sendMessage(message);
                    Scope.getCurrentScope().getLog(getClass()).info(message);
                    registerChangeLog(registerResponse.getProjectId(), changeLog, changeLogFile);
                }
                
                DeprecatedConfigurationValueProvider.setData(HubConfiguration.LIQUIBASE_HUB_API_KEY, registerResponse.getApiKey());
                message = "Great! Your free operation and deployment reports will be available to you after your local Liquibase commands complete.";
                Scope.getCurrentScope().getUI().sendMessage(message);
                Scope.getCurrentScope().getLog(getClass()).info(message);
            } catch (IOException ioe) {
                message = "Unable to write information to liquibase.properties: " + ioe.getMessage() + "\n" +
                        "Please check your permissions.  No operations will be reported.";
                Scope.getCurrentScope().getUI().sendMessage(message);
                Scope.getCurrentScope().getLog(getClass()).warning(message);
            } catch (CommandExecutionException cee) {
                message = "Unable to register changelog: " + cee.getMessage() + "\n" +
                        "No operations will be reported.";
                Scope.getCurrentScope().getUI().sendMessage(message);
                Scope.getCurrentScope().getLog(getClass()).warning(message);
                System.setProperty(HubConfiguration.LIQUIBASE_HUB_API_KEY.getKey(), null);
            }
        }
    }
    
    
    
    private void writeToPropertiesFile(File defaultsFile, String stringToWrite) throws IOException {
        String encoding = GlobalConfiguration.OUTPUT_FILE_ENCODING.getCurrentValue();
        try (RandomAccessFile randomAccessFile = new RandomAccessFile(defaultsFile, "rw")) {
            randomAccessFile.seek(defaultsFile.length());