MCPcopy Create free account
hub / github.com/METR/vivaria / pushStringValue

Method pushStringValue

server/src/lib/cmd_template_string.ts:147–158  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

145 }
146
147 private pushStringValue(s: string) {
148 if (s === '') {
149 return
150 }
151 // All other kinds of escapes are handled by node's child_process.spawn.
152 if (s.startsWith('-') && (!this.mergeable || this.args[this.args.length - 1] === '-')) {
153 throw new Error(
154 repr`forbidden argument ${s} starts with a dash. For flags, use trustedArg or move to string part.`,
155 )
156 }
157 this.pushMergeableValue(s)
158 }
159
160 private pushStandaloneValue(s: string) {
161 this.args.push(s)

Callers 1

pushValueMethod · 0.95

Calls 2

pushMergeableValueMethod · 0.95
reprFunction · 0.90

Tested by

no test coverage detected