Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit ba9e4a1

Browse files
committed
Always allow changing config
1 parent d6cafbc commit ba9e4a1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/main/java/fi/helsinki/cs/tmc/cli/command/ConfigCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ public void run(CliContext context, CommandLine args) {
183183
arguments = Arrays.stream(arguments).filter(o -> !o.trim().isEmpty()).toArray(String[]::new);
184184
this.properties = context.getProperties();
185185

186-
if (!update && !this.context.checkIsLoggedIn(false, true)) {
187-
return;
188-
}
189-
190186
this.context.getAnalyticsFacade().saveAnalytics("config");
191187

192188
if ((get ? 1 : 0) + (listing ? 1 : 0) + (delete ? 1 : 0) > 1) {

src/test/java/fi/helsinki/cs/tmc/cli/command/ConfigCommandTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ public void cleanUp() {
9393
}
9494

9595
@Test
96-
public void doNotRunIfNotLoggedIn() {
96+
public void doRunIfNotLoggedIn() {
9797
when(SettingsIo.loadAccountList()).thenReturn(new AccountList());
9898
app = new Application(ctx);
9999

100100
String[] args = {"config -l"};
101101
app.run(args);
102-
io.assertContains("You are not logged in");
102+
io.assertNotContains("You are not logged in");
103103
}
104104
@Test
105105
public void printsErrorIfNoArgumentsGiven() {

0 commit comments

Comments
 (0)