Mercurial > cgi-bin > hgweb.cgi > PassMan
changeset 23:af86b8e0b88c
Clean up exit output.
author | David Barts <n5jrn@me.com> |
---|---|
date | Tue, 02 Jul 2024 18:18:29 -0700 |
parents | 07406c4af4a5 |
children | 2188b2f13326 |
files | PassMan.iml src/main/kotlin/name/blackcap/passman/Main.kt |
diffstat | 2 files changed, 7 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/PassMan.iml Tue Jul 02 17:34:52 2024 -0700 +++ b/PassMan.iml Tue Jul 02 18:18:29 2024 -0700 @@ -1,57 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> - <component name="FacetManager"> - <facet type="kotlin-language" name="Kotlin"> - <configuration version="5" platform="JVM 1.8" allPlatforms="JVM [1.8]" useProjectSettings="false"> - <compilerSettings /> - <compilerArguments> - <stringArguments> - <stringArg name="jvmTarget" arg="1.8" /> - <stringArg name="apiVersion" arg="1.7" /> - <stringArg name="languageVersion" arg="1.7" /> - </stringArguments> - <arrayArguments> - <arrayArg name="pluginClasspaths" /> - <arrayArg name="pluginOptions" /> - </arrayArguments> - </compilerArguments> - </configuration> - </facet> - </component> - <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11"> - <output url="file://$MODULE_DIR$/target/classes" /> - <output-test url="file://$MODULE_DIR$/target/test-classes" /> - <content url="file://$MODULE_DIR$"> + <component name="AdditionalModuleElements"> + <content url="file://$MODULE_DIR$" dumb="true"> <sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> <excludeFolder url="file://$MODULE_DIR$/target" /> </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test-junit5:1.7.10" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test:1.7.10" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.2" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.7.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-reflect:1.7.10" level="project" /> - <orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.36.0.3" level="project" /> - <orderEntry type="library" name="Maven: commons-cli:commons-cli:1.5.0" level="project" /> - <orderEntry type="library" name="Maven: com.opencsv:opencsv:5.5" level="project" /> - <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" /> - <orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.9" level="project" /> - <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" /> - <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> - <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" /> - <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" /> </component> </module> \ No newline at end of file
--- a/src/main/kotlin/name/blackcap/passman/Main.kt Tue Jul 02 17:34:52 2024 -0700 +++ b/src/main/kotlin/name/blackcap/passman/Main.kt Tue Jul 02 18:18:29 2024 -0700 @@ -49,7 +49,11 @@ val QUIT = setOf<String>("exit", "quit") var lastStatus = 0 while (true) { - val rawLine = System.console()?.readLine("passman> ") ?: break + val rawLine = System.console()?.readLine("passman> ") + if (rawLine == null) { + println() // ensure shell prompt comes out on a line of its own + break + } val s = Shplitter() s.feed(rawLine) if (!s.complete) { @@ -82,7 +86,6 @@ lastStatus = 1 } } - println() // ensure shell prompt comes out on a line of its own exitProcess(lastStatus) }