JeremyYao commented on code in PR #1403: URL: https://github.com/apache/daffodil-vscode/pull/1403#discussion_r2334320424
########## src/daffodilDebugger/debugger.ts: ########## @@ -58,12 +58,18 @@ async function getTDMLConfig( config.schema.path = '' config.tdmlConfig.path = - config.tdmlConfig.path || - (await vscode.commands.executeCommand( - 'extension.dfdl-debug.getValidatedTDMLPath' - )) + config.tdmlConfig.path == '${AskForValidatedTDMLPath}' + ? await vscode.commands.executeCommand( + 'extension.dfdl-debug.getValidatedTDMLPath' + ) + : config.tdmlConfig.path - if (!config.tdmlConfig.path) return false + if (!config.tdmlConfig.path) { + vscode.window.showErrorMessage( + `Invalid path TDML Execute path ${config.tdmlConfig.path} was specified!` + ) + return false + } Review Comment: The check for undefined `tdmlConfig.path` is already defined via the ```Typescript if (!config.tdmlConfig.path) { vscode.window.showErrorMessage( `Invalid path TDML Execute path ${config.tdmlConfig.path} was specified!` ) return false } ``` block. The value `!undefined` evaluates to `true`. Also `!''`` returns true as well. ########## src/daffodilDebugger/debugger.ts: ########## @@ -58,12 +58,18 @@ async function getTDMLConfig( config.schema.path = '' config.tdmlConfig.path = - config.tdmlConfig.path || - (await vscode.commands.executeCommand( - 'extension.dfdl-debug.getValidatedTDMLPath' - )) + config.tdmlConfig.path == '${AskForValidatedTDMLPath}' + ? await vscode.commands.executeCommand( + 'extension.dfdl-debug.getValidatedTDMLPath' + ) + : config.tdmlConfig.path - if (!config.tdmlConfig.path) return false + if (!config.tdmlConfig.path) { + vscode.window.showErrorMessage( + `Invalid path TDML Execute path ${config.tdmlConfig.path} was specified!` + ) + return false + } Review Comment: The check for undefined `tdmlConfig.path` is already defined via the ```Typescript if (!config.tdmlConfig.path) { vscode.window.showErrorMessage( `Invalid path TDML Execute path ${config.tdmlConfig.path} was specified!` ) return false } ``` block. The value `!undefined` evaluates to `true`. Also `!''` returns true as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@daffodil.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org