diff --git a/README.md b/README.md index 66e6558..6c9f711 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,14 @@ $ cmdk version ```shell # For Linux -curl -L https://github.com/commandk-dev/cli/releases/download/v0.1.3/cmdk-cli-client-0.1.3-linux-x86_64.zip \ - --output cmdk-cli-client-0.1.3-linux-x86_64.zip +curl -L https://github.com/commandk-dev/cli/releases/download/v0.1.4/cmdk-cli-client-0.1.4-linux-x86_64.zip \ + --output cmdk-cli-client-0.1.4-linux-x86_64.zip ``` ```shell # For MacOS -curl -L https://github.com/commandk-dev/cli/releases/download/v0.1.3/cmdk-cli-client-0.1.3-osx-x86_64.zip \ - --output cmdk-cli-client-0.1.3-osx-x86_64.zip +curl -L https://github.com/commandk-dev/cli/releases/download/v0.1.4/cmdk-cli-client-0.1.4-osx-x86_64.zip \ + --output cmdk-cli-client-0.1.4-osx-x86_64.zip ``` 2. After downloading the ZIP file, extract its contents using the following command (replace with the actual downloaded file name), and install the binary: diff --git a/src/nativeMain/kotlin/dev/commandk/cli/commandk-cli.kt b/src/nativeMain/kotlin/dev/commandk/cli/commandk-cli.kt index a88dbe4..e9def10 100644 --- a/src/nativeMain/kotlin/dev/commandk/cli/commandk-cli.kt +++ b/src/nativeMain/kotlin/dev/commandk/cli/commandk-cli.kt @@ -88,7 +88,7 @@ val subcommands = emptyList() + @OptIn(ExperimentalForeignApi::class) fun main(args: Array) { - if (args[0] == "version") { + if (args.size > 1 && args[0] == "version") { VersionCommand(Terminal()) .run() } else {