File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 " python" ,
77 " tox"
88 ],
9- "version" : " 1.0.0 " ,
9+ "version" : " 1.0.1-dev " ,
1010 "license" : " MIT" ,
1111 "publisher" : " the-compiler" ,
1212 "repository" : {
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import { getTerminal } from './utils';
66
77const exec = util . promisify ( child_process . exec ) ;
88
9- export const commandToxListAllEnvs = 'tox -a' ;
9+ export const commandToxListAllEnvs = 'tox -a' ; //for tox v4 may switch to
10+ //export const commandToxListAllEnvs = 'tox list --no-desc';
1011
1112export async function getToxEnvs ( projDir : string ) {
1213 try {
@@ -34,13 +35,14 @@ export async function getToxEnvs(projDir: string) {
3435 return undefined ;
3536}
3637
37- export const commandToxRun = 'tox -e' ;
38+ export const commandToxRun = 'tox -e' ; //for tox v4 switch to
39+ //export const commandToxRun = 'tox run -e'; // does not work with a folder, needs to use --root/--workdir/..
3840
3941export function runTox ( envs : string [ ] , toxArguments : string , terminal : vscode . Terminal = getTerminal ( ) ) {
4042 const envArg = envs . join ( "," ) ;
4143 terminal . show ( true ) ; // preserve focus
4244
43- // FIXME In theory, there's a command injection here, if an environment name
45+ // FIXME: In theory, there's a command injection here, if an environment name
4446 // contains shell metacharacters. However:
4547 // - Escaping the argument in a shell-agnostic way is hard:
4648 // https://github.com/microsoft/vscode/blob/1.57.0/src/vs/workbench/contrib/debug/node/terminals.ts#L84-L211
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export function create() {
3737
3838 const start = Date . now ( ) ;
3939 try {
40- const cwd = vscode . workspace . getWorkspaceFolder ( test . uri ! ) ! . uri . path ;
40+ const cwd = "--workdir " + vscode . workspace . getWorkspaceFolder ( test . uri ! ) ! . uri . path + "/.tox" ;
4141 runTox ( [ test . label ] , cwd ) ;
4242 run . passed ( test , Date . now ( ) - start ) ;
4343 }
You can’t perform that action at this time.
0 commit comments