michael-hoke commented on code in PR #1403:
URL: https://github.com/apache/daffodil-vscode/pull/1403#discussion_r2338031793


##########
src/daffodilDebugger/debugger.ts:
##########
@@ -58,12 +58,16 @@ async function getTDMLConfig(
     config.schema.path = ''
 
     config.tdmlConfig.path =
-      config.tdmlConfig.path ||
-      (await vscode.commands.executeCommand(
-        'extension.dfdl-debug.getValidatedTDMLPath'
-      ))
+      config.tdmlConfig.path == '${AskForValidatedTDMLPath}' ||
+      !config.tdmlConfig.path
+        ? await vscode.commands.executeCommand(
+            'extension.dfdl-debug.getValidatedTDMLPath'
+          )
+        : config.tdmlConfig.path

Review Comment:
   This is a case where a ternary is harder to read than an if statement. The 
`config.tdmlConfig.path == '${AskForValidatedTDMLPath}'` is the main culprit 
here (and should be ===).
   
   ``` 
   if (!config.tdmlConfig.path || config.tdmlConfig.path === 
'${AskForValidatedTDMLPath}')
   {
     config.tdmlConfig.path = await 
vscode.commands.executeCommand('extension.dfdl-debug.getValidatedTDMLPath')
   }
   ```



##########
src/daffodilDebugger/debugger.ts:
##########
@@ -78,7 +78,7 @@ async function getTDMLConfig(
   if (config?.tdmlConfig?.action === 'generate') {
     config.tdmlConfig.name =
       config.tdmlConfig.name || getDefaultTDMLTestCaseName()
-    config.tdmlConfig.path = config.tdmlConfig.path || getTmpTDMLFilePath()
+    config.tdmlConfig.path = getTmpTDMLFilePath()

Review Comment:
   Did this need to be added back in?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to