aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-19 15:03:42 +0100
committerFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-19 15:21:37 +0100
commite2d78d7b3314104d681be8ba07427a2cbfa12824 (patch)
tree8f4d3999e5399bc1a8d4af02dd0123b6b6b8c509
parent41e3b3b42e4dc891aaf5fca9f87e9c9cb9325011 (diff)
downloadRSAComb-e2d78d7b3314104d681be8ba07427a2cbfa12824.tar.gz
RSAComb-e2d78d7b3314104d681be8ba07427a2cbfa12824.zip
fix(cli): handle empty list of arguments for some CLI flags
-rw-r--r--src/main/scala/uk/ac/ox/cs/rsacomb/RSAConfig.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAConfig.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAConfig.scala
index 57c4f05..32460b4 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAConfig.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAConfig.scala
@@ -196,12 +196,12 @@ object RSAConfig {
196 case 'data => { 196 case 'data => {
197 val paths = v.get[List[os.Path]] 197 val paths = v.get[List[os.Path]]
198 val ellipsis = if (paths.length > 1) " [...]" else "" 198 val ellipsis = if (paths.length > 1) " [...]" else ""
199 Logger print s"Data files: ${paths.head}$ellipsis" 199 Logger print s"Data files: ${paths.headOption.getOrElse("NONE")}$ellipsis"
200 } 200 }
201 case 'queries => { 201 case 'queries => {
202 val paths = v.get[List[os.Path]] 202 val paths = v.get[List[os.Path]]
203 val ellipsis = if (paths.length > 1) " [...]" else "" 203 val ellipsis = if (paths.length > 1) " [...]" else ""
204 Logger print s"Query files: ${paths.head}$ellipsis" 204 Logger print s"Query files: ${paths.headOption.getOrElse("NONE")}$ellipsis"
205 } 205 }
206 case 'answers => Logger print s"Path to answers: ${v.get[os.Path]}" 206 case 'answers => Logger print s"Path to answers: ${v.get[os.Path]}"
207 case 'approximation => Logger print s"Applied approximation: ${v.get[Symbol].name}" 207 case 'approximation => Logger print s"Applied approximation: ${v.get[Symbol].name}"