Skip to content

Commit 1ab7897

Browse files
mikeharderjnlycklama
authored andcommitted
[TypeSpec Validation] Quote argument to "tsp format" (#26210)
- Prevents shell expansion which may miss files - Fixes microsoft/typespec#2568
1 parent 1d57cce commit 1ab7897

File tree

1 file changed

+1
-1
lines changed
  • eng/tools/TypeSpecValidation/src/rules

1 file changed

+1
-1
lines changed

eng/tools/TypeSpecValidation/src/rules/format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class FormatRule implements Rule {
99
async execute(folder: string): Promise<RuleResult> {
1010
// Format parent folder to include shared files
1111

12-
let [err, stdOutput, errorOutput] = await runCmd(`npx tsp format ../**/*.tsp`, folder);
12+
let [err, stdOutput, errorOutput] = await runCmd(`npx tsp format "../**/*.tsp"`, folder);
1313
// Failing on both err and errorOutput because of known bug in tsp format where it returns 0 on failed formatting
1414
// https://github.com/microsoft/typespec/issues/2323
1515
let success = !err && !errorOutput;

0 commit comments

Comments
 (0)