@@ -169,7 +169,8 @@ export class EffektManager {
169169 // Try next option
170170 }
171171 }
172- throw ( 'Effekt executable not found' ) ;
172+
173+ throw new Error ( 'Effekt executable not found' ) ;
173174 }
174175
175176 /**
@@ -236,25 +237,26 @@ export class EffektManager {
236237 version
237238 } ;
238239 } catch ( error ) {
239- // If locateEffektExecutable fails, try to locate in global npm directory
240- const npmRoot = await this . execCommand ( 'npm root -g' ) ;
241-
242- for ( const execName of this . possibleEffektExecutables ) {
243- const fullPath = path . join ( npmRoot , execName ) ;
244- if ( await this . fileExists ( fullPath ) ) {
245- try {
246- const version = await this . fetchEffektVersion ( fullPath ) ;
247- return {
248- success : true ,
249- executable : fullPath ,
250- message : `Effekt found at ${ fullPath } , but not in PATH.` ,
251- version
252- } ;
253- } catch {
254- // Executable exists but doesn't work, continue to next
255- }
240+ // If locateEffektExecutable fails, try to locate in global npm directory
241+ const npmRoot = await this . execCommand ( 'npm root -g' ) ;
242+
243+ for ( const execName of this . possibleEffektExecutables ) {
244+ const fullPath = path . join ( npmRoot , execName ) ;
245+ if ( await this . fileExists ( fullPath ) ) {
246+ try {
247+ const version = await this . fetchEffektVersion ( fullPath ) ;
248+ return {
249+ success : true ,
250+ executable : fullPath ,
251+ message : `Effekt found at ${ fullPath } , but not in PATH.` ,
252+ version
253+ } ;
254+ } catch {
255+ // Executable exists but doesn't work, continue to next
256256 }
257257 }
258+ }
259+
258260 return {
259261 success : false ,
260262 message : "Effekt was installed but couldn't be located or executed. Please check your installation."
0 commit comments