@@ -43,7 +43,10 @@ suite('Module Installer', () => {
43
43
proxyServers . forEach ( proxyServer => {
44
44
[ undefined , Uri . file ( '/users/dev/xyz' ) ] . forEach ( resource => {
45
45
// Conda info is relevant only for CondaInstaller.
46
- const condaEnvs = installerClass === CondaInstaller ? [ { name : 'My-Env01' , path : '' } , { name : '' , path : '/conda/path' } ] : [ ] ;
46
+ const condaEnvs = installerClass === CondaInstaller ? [
47
+ { name : 'My-Env01' , path : '' } , { name : '' , path : path . join ( 'conda' , 'path' ) } ,
48
+ { name : 'My-Env01 With Spaces' , path : '' } , { name : '' , path : path . join ( 'conda with spaces' , 'path' ) }
49
+ ] : [ ] ;
47
50
[ undefined , ...condaEnvs ] . forEach ( condaEnvInfo => {
48
51
const testProxySuffix = proxyServer . length === 0 ? 'without proxy info' : 'with proxy info' ;
49
52
const testCondaEnv = condaEnvInfo ? ( condaEnvInfo . name ? 'without conda name' : 'with conda path' ) : 'without conda' ;
@@ -144,10 +147,10 @@ suite('Module Installer', () => {
144
147
const expectedArgs = [ 'install' ] ;
145
148
if ( condaEnvInfo && condaEnvInfo . name ) {
146
149
expectedArgs . push ( '--name' ) ;
147
- expectedArgs . push ( condaEnvInfo . name ) ;
150
+ expectedArgs . push ( condaEnvInfo . name . toCommandArgument ( ) ) ;
148
151
} else if ( condaEnvInfo && condaEnvInfo . path ) {
149
152
expectedArgs . push ( '--prefix' ) ;
150
- expectedArgs . push ( condaEnvInfo . path ) ;
153
+ expectedArgs . push ( condaEnvInfo . path . fileToCommandArgument ( ) ) ;
151
154
}
152
155
expectedArgs . push ( '"pylint<2.0.0"' ) ;
153
156
await installModuleAndVerifyCommand ( condaExecutable , expectedArgs ) ;
@@ -176,10 +179,10 @@ suite('Module Installer', () => {
176
179
const expectedArgs = [ 'install' ] ;
177
180
if ( condaEnvInfo && condaEnvInfo . name ) {
178
181
expectedArgs . push ( '--name' ) ;
179
- expectedArgs . push ( condaEnvInfo . name ) ;
182
+ expectedArgs . push ( condaEnvInfo . name . toCommandArgument ( ) ) ;
180
183
} else if ( condaEnvInfo && condaEnvInfo . path ) {
181
184
expectedArgs . push ( '--prefix' ) ;
182
- expectedArgs . push ( condaEnvInfo . path ) ;
185
+ expectedArgs . push ( condaEnvInfo . path . fileToCommandArgument ( ) ) ;
183
186
}
184
187
expectedArgs . push ( 'pylint' ) ;
185
188
await installModuleAndVerifyCommand ( condaExecutable , expectedArgs ) ;
@@ -223,10 +226,10 @@ suite('Module Installer', () => {
223
226
const expectedArgs = [ 'install' ] ;
224
227
if ( condaEnvInfo && condaEnvInfo . name ) {
225
228
expectedArgs . push ( '--name' ) ;
226
- expectedArgs . push ( condaEnvInfo . name ) ;
229
+ expectedArgs . push ( condaEnvInfo . name . toCommandArgument ( ) ) ;
227
230
} else if ( condaEnvInfo && condaEnvInfo . path ) {
228
231
expectedArgs . push ( '--prefix' ) ;
229
- expectedArgs . push ( condaEnvInfo . path ) ;
232
+ expectedArgs . push ( condaEnvInfo . path . fileToCommandArgument ( ) ) ;
230
233
}
231
234
expectedArgs . push ( moduleName ) ;
232
235
await installModuleAndVerifyCommand ( condaExecutable , expectedArgs ) ;
0 commit comments