diff options
Diffstat (limited to 'src/jsMain/kotlin/moe/nea89/website/KFiles.kt')
-rw-r--r-- | src/jsMain/kotlin/moe/nea89/website/KFiles.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jsMain/kotlin/moe/nea89/website/KFiles.kt b/src/jsMain/kotlin/moe/nea89/website/KFiles.kt index aad3036..d5eff5a 100644 --- a/src/jsMain/kotlin/moe/nea89/website/KFiles.kt +++ b/src/jsMain/kotlin/moe/nea89/website/KFiles.kt @@ -151,10 +151,11 @@ class FileSystemBuilder { } } -suspend fun ShellExecutionContext.requireFileAccessor(): FileAccessor { +suspend fun ShellExecutionContext.requireFileAccessor(error: String? = "There is no file accessor present :("): FileAccessor { val fa = console.fileAccessor if (fa == null) { - console.addLine("There is no file accessor present :(") + if (error != null) + console.addLine(error) exit() } return fa |