File tree 1 file changed +2
-5
lines changed
extensions/positron-python/src/client/pythonEnvironments/common/environmentManagers
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,17 @@ export function getPyenvDir(): string {
21
21
return pyenvDir ;
22
22
}
23
23
24
- async function getPyenvBinary ( ) : Promise < string | undefined > {
24
+ async function getPyenvBinary ( ) : Promise < string > {
25
25
const pyenvDir = getPyenvDir ( ) ;
26
26
const pyenvBin = path . join ( pyenvDir , 'bin' , 'pyenv' ) ;
27
27
if ( await pathExists ( pyenvBin ) ) {
28
28
return pyenvBin ;
29
29
}
30
- return undefined ;
30
+ return 'pyenv' ;
31
31
}
32
32
33
33
export async function getActivePyenvForDirectory ( cwd : string ) : Promise < string | undefined > {
34
34
const pyenvBin = await getPyenvBinary ( ) ;
35
- if ( ! pyenvBin ) {
36
- return undefined ;
37
- }
38
35
try {
39
36
const pyenvInterpreterPath = await shellExecute ( `${ pyenvBin } which python` , { cwd } ) ;
40
37
return pyenvInterpreterPath . stdout . trim ( ) ;
You can’t perform that action at this time.
0 commit comments