File tree Expand file tree Collapse file tree
src/main/kotlin/ai/devchat/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class PythonEnvManager(private val workDir: String) {
3232 val dstDir = dstFile.parentFile
3333 dstDir.exists() || dstDir.mkdirs() || throw RuntimeException (" Unable to create directory: $dstDir " )
3434 javaClass.getResource(
35- " /tools/micromamba-${OSInfo .platform} /bin/micromamba"
35+ " /tools/micromamba-${OSInfo .platform} /bin/micromamba${ if ( OSInfo .isWindows) " .exe " else " " } "
3636 )!! .openStream().buffered().use { input ->
3737 dstFile.outputStream().buffered().use { output ->
3838 input.copyTo(output)
@@ -86,11 +86,11 @@ class PythonEnvManager(private val workDir: String) {
8686
8787
8888class PythonEnv (private val workDir : String ) {
89- val pythonCommand = Paths .get(
90- workDir,
91- " bin " ,
92- " python ${ if ( OSInfo .isWindows) " .exe " else " " } "
93- ).toString()
89+ val pythonCommand = if ( OSInfo .isWindows) {
90+ Paths .get( workDir, " python.exe " ).toString()
91+ } else {
92+ Paths .get(workDir, " bin " , " python " ).toString()
93+ }
9494 private var sourceIndex = 0
9595 fun installPackage (packageName : String , packageVersion : String ) {
9696 pipInstall(" $packageName ==$packageVersion " )
You can’t perform that action at this time.
0 commit comments