@@ -18,6 +18,8 @@ interface ProcessingVersion {
1818let terminal : Terminal | undefined ;
1919
2020export async function activate ( context : ExtensionContext ) {
21+ // TODO: Check for other Processing plugins and request deactivation if they are installed
22+
2123 const config = workspace . getConfiguration ( 'processing' ) ;
2224
2325 let binaryPath = context . asAbsolutePath ( join ( `install-locator-${ process . platform } ` , 'bin' , 'install-locator' ) ) ;
@@ -157,35 +159,35 @@ export async function activate(context: ExtensionContext) {
157159
158160
159161 const runSketch = commands . registerCommand ( 'processing.sketch.run' , ( resource : Uri ) => {
160- if ( ! resource ) {
161- return ;
162- }
162+ if ( ! resource ) {
163+ return ;
164+ }
163165
164- // Create a new terminal
165- if ( terminal === undefined ) {
166- terminal = window . createTerminal ( "Sketch" ) ;
167- }
166+ // Create a new terminal
167+ if ( terminal === undefined ) {
168+ terminal = window . createTerminal ( "Sketch" ) ;
169+ }
168170
169- // Show the terminal panel
170- terminal . show ( true ) ;
171+ // Show the terminal panel
172+ terminal . show ( true ) ;
171173
172- // clear the terminal
173- terminal . sendText ( "clear" , true ) ;
174+ // clear the terminal
175+ terminal . sendText ( "clear" , true ) ;
174176
175- let path = selectedVersion . path ;
176- if ( process . platform === "win32" ) {
177- // on windows we need to escape spaces
178- path = `& "${ path } "` ;
179- }
177+ let path = selectedVersion . path ;
178+ if ( process . platform === "win32" ) {
179+ // on windows we need to escape spaces
180+ path = `& "${ path } "` ;
181+ }
180182
181- // Send the command to the terminal
182- terminal . sendText (
183- `${ path } cli --sketch=${ dirname (
184- resource . fsPath
185- ) } --run`,
186- true
187- ) ;
188- } ) ;
183+ // Send the command to the terminal
184+ terminal . sendText (
185+ `${ path } cli --sketch=" ${ dirname (
186+ resource . fsPath
187+ ) } " --run`,
188+ true
189+ ) ;
190+ } ) ;
189191
190192 const stopSketch = commands . registerCommand ( 'processing.sketch.stop' , ( ) => {
191193 if ( terminal === undefined ) {
0 commit comments