fix: harden workflow console review paths
This commit is contained in:
@@ -495,7 +495,7 @@ describe("run operation registry", () => {
|
||||
bind_outputs: { "output value": "state target" },
|
||||
}),
|
||||
).toBe(
|
||||
"uv run wf draft add capability console.demo --revision 1 --step echo --capability local.example.echo --route 'when done=state path' --input 'input value=local target''s' --bind-output 'output value=state target'",
|
||||
"uv run wf draft add capability console.demo --revision 1 --step echo --capability local.example.echo --route 'when done=state path' --input 'input value=local target'\\''s' --bind-output 'output value=state target'",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -158,9 +158,10 @@ const interpretNextActions = (nextActions: {
|
||||
|
||||
const shellArg = (value: string | number): string => {
|
||||
const text = String(value);
|
||||
return /^[A-Za-z0-9._/@=:-]+$/.test(text) ? text : `'${text.replace(/'/g, "''")}'`;
|
||||
return /^[A-Za-z0-9._/@=:-]+$/.test(text)
|
||||
? text
|
||||
: `'${text.replace(/'/g, "'\\''")}'`;
|
||||
};
|
||||
|
||||
const nonEquivalentCli = (
|
||||
command: string,
|
||||
fields: readonly string[],
|
||||
|
||||
Reference in New Issue
Block a user