Commit e08763f 1 parent ca181d1 commit e08763f Copy full SHA for e08763f
File tree 1 file changed +19
-14
lines changed
1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -283,23 +283,28 @@ export class ManimSideview {
283
283
284
284
private async getManimPath ( ) {
285
285
let manimPath = path . normalize ( getUserConfiguration ( "defaultManimPath" ) ) ;
286
- const env = await this . getPythonEnvironment ( ) ;
287
286
let envName = "" ;
288
- if ( env ) {
289
- envName = env . name || "base" ;
290
- Log . info ( `Using python environment "${ envName } " for manim.` ) ;
291
-
292
- let bin =
293
- PYTHON_ENV_SCRIPTS_FOLDER [ process . platform as keyof typeof PYTHON_ENV_SCRIPTS_FOLDER ] ;
294
- if ( ! bin ) {
295
- Log . error (
296
- "Manim Sideview: Unsupported platform for python environment. Assuming linux directory."
297
- ) ;
298
- bin = PYTHON_ENV_SCRIPTS_FOLDER [ "linux" ] ;
299
- }
300
287
301
- manimPath = path . join ( env . folderUri . fsPath , bin , manimPath ) ;
288
+ if ( ! path . isAbsolute ( manimPath ) ) {
289
+ const env = await this . getPythonEnvironment ( ) ;
290
+ if ( env ) {
291
+ envName = env . name || "base" ;
292
+ Log . info ( `Using python environment "${ envName } " for manim.` ) ;
293
+
294
+ let bin =
295
+ PYTHON_ENV_SCRIPTS_FOLDER [ process . platform as keyof typeof PYTHON_ENV_SCRIPTS_FOLDER ] ;
296
+ if ( ! bin ) {
297
+ Log . error (
298
+ "Manim Sideview: Unsupported platform for python environment. Assuming linux directory."
299
+ ) ;
300
+ bin = PYTHON_ENV_SCRIPTS_FOLDER [ "linux" ] ;
301
+ }
302
+
303
+ manimPath = path . join ( env . folderUri . fsPath , bin , manimPath ) ;
304
+ Log . info ( `Resolved manim path inside the venv ${ env . folderUri . fsPath } + ${ bin } + ${ manimPath } ` ) ;
305
+ }
302
306
}
307
+
303
308
return { manim : manimPath , envName } ;
304
309
}
305
310
You can’t perform that action at this time.
0 commit comments