Skip to content

Commit 2816d70

Browse files
fix(client): incorrect getPackageVersion impl
1 parent bba3567 commit 2816d70

File tree

1 file changed

+4
-4
lines changed
  • scrapegraphai-java-core/src/main/kotlin/com/scrapegraphai/api/core

1 file changed

+4
-4
lines changed

scrapegraphai-java-core/src/main/kotlin/com/scrapegraphai/api/core/Properties.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package com.scrapegraphai.api.core
44

5-
import java.util.Properties
5+
import com.scrapegraphai.api.client.ScrapegraphaiClient
66

77
fun getOsArch(): String {
88
val osArch = System.getProperty("os.arch")
@@ -16,7 +16,7 @@ fun getOsArch(): String {
1616
"x86_64" -> "x64"
1717
"arm" -> "arm"
1818
"aarch64" -> "arm64"
19-
else -> "other:${osArch}"
19+
else -> "other:$osArch"
2020
}
2121
}
2222

@@ -30,13 +30,13 @@ fun getOsName(): String {
3030
osName.startsWith("Linux") -> "Linux"
3131
osName.startsWith("Mac OS") -> "MacOS"
3232
osName.startsWith("Windows") -> "Windows"
33-
else -> "Other:${osName}"
33+
else -> "Other:$osName"
3434
}
3535
}
3636

3737
fun getOsVersion(): String = System.getProperty("os.version", "unknown")
3838

3939
fun getPackageVersion(): String =
40-
Properties::class.java.`package`.implementationVersion ?: "unknown"
40+
ScrapegraphaiClient::class.java.`package`.implementationVersion ?: "unknown"
4141

4242
fun getJavaVersion(): String = System.getProperty("java.version", "unknown")

0 commit comments

Comments
 (0)