We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad913b2 commit 4ded49fCopy full SHA for 4ded49f
frontend/utilities/yaml/index.ts
@@ -22,16 +22,14 @@ export const agentOptionsToYaml = (agentOpts: any) => {
22
!agentOpts.command_line_flags ||
23
Object.keys(agentOpts.command_line_flags).length === 0
24
) {
25
- agentOpts.command_line_flags = {};
+ // delete it so it does not render, and will add it explicitly after (along with the comment)
26
+ delete agentOpts.command_line_flags;
27
addFlagsComment = true;
28
}
29
30
let yamlString = yaml.dump(agentOpts);
31
if (addFlagsComment) {
- yamlString = yamlString.replace(
32
- "command_line_flags: {}\n",
33
- "command_line_flags: {} # requires Orbit\n"
34
- );
+ yamlString += "command_line_flags: {} # requires Orbit\n";
35
36
37
return yamlString;
0 commit comments