You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor validation logic into shared utility function
Based on code review feedback:
- Extracted duplicated validation logic to validateFileSystemUri() in cmdUtil.ts
- Updated all 8 command files to use the shared function
- Simplified test assertions
- Improved code maintainability by reducing duplication
Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
"Unable to determine working folder for {0} command. The selected file has an unsupported URI scheme '{1}' (selectedItem type: {2}). "+
38
+
"Azure Developer CLI commands are not supported in virtual file systems. Please open a local folder or clone the repository locally.",
39
+
commandName,
40
+
selectedFile.scheme,
41
+
itemType
42
+
));
43
+
}
44
+
}
45
+
15
46
// If the command was invoked with a specific file context, use the file context as the working directory for running Azure developer CLI commands.
16
47
// Otherwise search the workspace for "azure.yaml" or "azure.yml" files. If only one is found, use it (i.e. its folder). If more than one is found, ask the user which one to use.
17
48
// If at this point we still do not have a working directory, prompt the user to select one.
0 commit comments