{"record":{"id":"7f50dbb90d2108b9","repo":"CanineHQ/canine","slug":"command-command-join-failed-with-exit-co","errorCode":null,"errorMessage":"Command `#{command.join(' ')}` failed with exit code #{status.exitstatus}: #{stderr}","messagePattern":"Command `#(.+?)` failed with exit code #(.+?): #(.+?)","errorType":"exception","errorClass":"Cli::CommandFailedError","httpStatus":null,"severity":"error","filePath":"app/services/cli.rb","lineNumber":7,"sourceCode":"module Cli\n  class CommandFailedError < StandardError; end\n  class RunAndReturnOutput\n    def call(command, envs: {})\n      command = Array(command)\n      stdout, stderr, status = Open3.capture3(envs, *command)\n      raise CommandFailedError, \"Command `#{command.join(' ')}` failed with exit code #{status.exitstatus}: #{stderr}\" unless status.success?\n      stdout\n    end\n  end\n\n  class RunAndLog\n    attr_reader :output\n    def initialize(loggable, killable: nil, log_command: false)\n      @loggable = loggable\n      @killable = killable\n      @process = nil\n      @monitor_thread = nil\n      @output = \"\"\n      @log_command = log_command\n    end\n\n    def call(command, envs: {}, clear_output: true)\n      if clear_output\n        @output = \"\"","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/services/cli.rb#L1-L25","documentation":"Error \"Command `#{command.join(' ')}` failed with exit code #{status.exitstatus}: #{stderr}\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/services/cli.rb:7 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ba4ee3968d8513ee27d8583fbd3e854a8dd053f3","analyzedAt":"2026-08-23T17:49:27.834Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}